svnno****@sourc*****
svnno****@sourc*****
2009年 8月 4日 (火) 11:31:57 JST
Revision: 949 http://sourceforge.jp/projects/hiki/svn/view?view=rev&revision=949 Author: okkez Date: 2009-08-04 11:31:57 +0900 (Tue, 04 Aug 2009) Log Message: ----------- use dot instead of double colon when call singleton methods (:: -> .) Modified Paths: -------------- hiki/trunk/ChangeLog hiki/trunk/misc/plugin/attach/attach.cgi Modified: hiki/trunk/ChangeLog =================================================================== --- hiki/trunk/ChangeLog 2009-08-01 03:52:37 UTC (rev 948) +++ hiki/trunk/ChangeLog 2009-08-04 02:31:57 UTC (rev 949) @@ -1,3 +1,8 @@ +2009-08-04 okkez <okkez****@gmail*****> + + * misc/plugin/attach/attach.cgi: use dot instead of double colon + when call singleton methods. + 2009-08-01 Kazuhiko <kazuh****@fdiar*****> * hiki/util.rb (Hiki::Util::sendmail): fix a typo (Hiki::Version Modified: hiki/trunk/misc/plugin/attach/attach.cgi =================================================================== --- hiki/trunk/misc/plugin/attach/attach.cgi 2009-08-01 03:52:37 UTC (rev 948) +++ hiki/trunk/misc/plugin/attach/attach.cgi 2009-08-04 02:31:57 UTC (rev 949) @@ -6,10 +6,10 @@ $SAFE = 1 -if FileTest::symlink?( __FILE__ ) then - org_path = File::dirname( File::expand_path( File::readlink( __FILE__ ) ) ) +if FileTest.symlink?( __FILE__ ) then + org_path = File.dirname( File.expand_path( File.readlink( __FILE__ ) ) ) else - org_path = File::dirname( File::expand_path( __FILE__ ) ) + org_path = File.dirname( File.expand_path( __FILE__ ) ) end $:.unshift( org_path.untaint, "#{org_path.untaint}/hiki" ) $:.delete(".") if File.writable?(".") @@ -21,7 +21,7 @@ include Hiki::Util def attach_file - @conf = Hiki::Config::new + @conf = Hiki::Config.new set_conf(@conf) cgi = CGI.new @@ -72,12 +72,12 @@ Dir.foreach(attach_path) do |file| next unless params["file_#{file}"][0] path = "#{attach_path}/#{file}" - if FileTest::file?(path.untaint) and params["file_#{file}"][0].read - File::unlink(path) + if FileTest.file?(path.untaint) and params["file_#{file}"][0].read + File.unlink(path) r << "FILE = #{File.basename(path)}\n" end end - Dir::rmdir(attach_path) if Dir::entries(attach_path).size == 2 + Dir.rmdir(attach_path) if Dir.entries(attach_path).size == 2 send_updating_mail(page, 'detach', r) if****@conf*****_on_update redirect(cgi, "#{@conf.index_url}?c=#{command}&p=#{page.escape}") rescue Exception => ex