From: <kaz...@us...> - 2009-07-31 14:57:16
|
Revision: 3491 http://tdiary.svn.sourceforge.net/tdiary/?rev=3491&view=rev Author: kazuhiko Date: 2009-07-31 14:57:04 +0000 (Fri, 31 Jul 2009) Log Message: ----------- * tdiary.rb: dirty workaround to avoid recursive sort that causes SecurityError in @secure=true environment since http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=16081 Modified Paths: -------------- trunk/core/ChangeLog trunk/core/tdiary.rb Modified: trunk/core/ChangeLog =================================================================== --- trunk/core/ChangeLog 2009-07-31 13:32:33 UTC (rev 3490) +++ trunk/core/ChangeLog 2009-07-31 14:57:04 UTC (rev 3491) @@ -1,3 +1,8 @@ +2009-07-31 Kazuhiko <kaz...@fd...> + * tdiary.rb: dirty workaround to avoid recursive sort that causes + SecurityError in @secure=true environment since + http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=16081 + 2009-07-28 Kazuhiko <kaz...@fd...> * skel/footer.rhtml: display fcgi information in footer. Modified: trunk/core/tdiary.rb =================================================================== --- trunk/core/tdiary.rb 2009-07-31 13:32:33 UTC (rev 3490) +++ trunk/core/tdiary.rb 2009-07-31 14:57:04 UTC (rev 3491) @@ -7,7 +7,7 @@ You can redistribute it and/or modify it under GPL2. =end -TDIARY_VERSION = '2.3.2.20090621' +TDIARY_VERSION = '2.3.2.20090731' $:.insert( 1, File::dirname( __FILE__ ).untaint + '/misc/lib' ) @@ -278,7 +278,11 @@ def each_referer( limit = 10 ) newer_referer - @referers.values.sort.reverse.each_with_index do |ary,idx| + # dirty workaround to avoid recursive sort that + # causes SecurityError in @secure=true + # environment since + # http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=16081 + @referers.values.sort_by{|e| "%08d_%s" % e}.reverse.each_with_index do |ary,idx| break if idx >= limit yield ary[0], ary[1] end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |