[Hiki-cvs 1521] [1064] use @request instead of @cgi

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 9月 10日 (木) 23:02:28 JST


Revision: 1064
          http://sourceforge.jp/projects/hiki/svn/view?view=rev&revision=1064
Author:   okkez
Date:     2009-09-10 23:02:28 +0900 (Thu, 10 Sep 2009)

Log Message:
-----------
use @request instead of @cgi

Modified Paths:
--------------
    hiki/branches/rack/plugin/00default.rb
    hiki/branches/rack/plugin/01sp.rb

Modified: hiki/branches/rack/plugin/00default.rb
===================================================================
--- hiki/branches/rack/plugin/00default.rb	2009-09-10 14:02:26 UTC (rev 1063)
+++ hiki/branches/rack/plugin/00default.rb	2009-09-10 14:02:28 UTC (rev 1064)
@@ -81,13 +81,13 @@
   s = ''
   c = 0
   ddd = nil
-  
+
   l.each do |a|
     break if (c += 1) > n
     name = a.keys[0]
     p = a[name]
-    
-    tm = p[:last_modified ] 
+
+    tm = p[:last_modified ]
     cur_date = tm.strftime( @conf.msg_date_format )
 
     if ddd != cur_date
@@ -155,7 +155,7 @@
   <link rel="stylesheet" type="text/css" href="#{h(theme_url)}" media="all">
 EOS
   s << <<EOS if @command != 'view'
-  <meta name="ROBOTS" content="NOINDEX,NOFOLLOW"> 
+  <meta name="ROBOTS" content="NOINDEX,NOFOLLOW">
   <meta http-equiv="pragma" content="no-cache">
   <meta http-equiv="cache-control" content="no-cache">
   <meta http-equiv="expires" content="0">
@@ -229,24 +229,24 @@
 # conf: default
 def saveconf_default
   if @mode == 'saveconf' then
-    @conf.site_name =****@cgi*****['site_name']
-    @conf.author_name =****@cgi*****['author_name']
+    @conf.site_name =****@reque*****['site_name']
+    @conf.author_name =****@reque*****['author_name']
     mails = []
-    @cgi.params['mail'].each_line do |addr|
+    @request.params['mail'].each_line do |addr|
       mails << addr.gsub(/\r?\n/, '').strip
     end
     mails.delete_if{|e| e.empty?}
     @conf.mail = mails
-    @conf.mail_on_update =****@cgi*****['mail_on_update'] == "true"
+    @conf.mail_on_update =****@reque*****['mail_on_update'] == "true"
   end
 end
 
 # conf: password
 def saveconf_password
   if @mode == 'saveconf' then
-    old_password    =****@cgi*****['old_password']
-    password1       =****@cgi*****['password1']
-    password2       =****@cgi*****['password2']
+    old_password    =****@reque*****['old_password']
+    password1       =****@reque*****['password1']
+    password2       =****@reque*****['password2']
     if password1 and password1.size > 0
       if (@conf.password.size > 0 && old_password.crypt( @conf.password ) !=****@conf*****) ||
           (password1 != password2)
@@ -265,20 +265,20 @@
   # dummy
 end
 
-if****@cgi*****['conf'] == 'theme' && @mode == 'saveconf'
-  @conf.theme          =****@cgi*****['theme'] || ''
-  @conf.use_sidebar    =****@cgi*****['sidebar'] == "true"
-  @conf.main_class     =****@cgi*****['main_class']
+if****@reque*****['conf'] == 'theme' && @mode == 'saveconf'
+  @conf.theme          =****@reque*****['theme'] || ''
+  @conf.use_sidebar    =****@reque*****['sidebar'] == "true"
+  @conf.main_class     =****@reque*****['main_class']
   @conf.main_class     = 'main' if****@conf*****_class == ''
-  @conf.sidebar_class  =****@cgi*****['sidebar_class']
+  @conf.sidebar_class  =****@reque*****['sidebar_class']
   @conf.sidebar_class  = 'sidebar' if****@conf*****_class == ''
-  @conf.auto_link      =****@cgi*****['auto_link'] == "true"
-  @conf.use_wikiname   =****@cgi*****['use_wikiname'] == "true"
-  @conf.theme_url      =****@cgi*****['theme_url']
-  @conf.theme_path     =****@cgi*****['theme_path']
+  @conf.auto_link      =****@reque*****['auto_link'] == "true"
+  @conf.use_wikiname   =****@reque*****['use_wikiname'] == "true"
+  @conf.theme_url      =****@reque*****['theme_url']
+  @conf.theme_path     =****@reque*****['theme_path']
 end
 
-if****@cgi*****['conf'] == 'theme'
+if****@reque*****['conf'] == 'theme'
   @conf_theme_list = []
   Dir.glob( "#{@conf.theme_path}/*".untaint ).sort.each do |dir|
     theme = File.basename( dir )
@@ -291,7 +291,7 @@
 # conf: XML-RPC
 def saveconf_xmlrpc
   if @mode == 'saveconf'
-    @conf.xmlrpc_enabled =****@cgi*****['xmlrpc_enabled'] == 'true'
+    @conf.xmlrpc_enabled =****@reque*****['xmlrpc_enabled'] == 'true'
   end
 end
 

Modified: hiki/branches/rack/plugin/01sp.rb
===================================================================
--- hiki/branches/rack/plugin/01sp.rb	2009-09-10 14:02:26 UTC (rev 1063)
+++ hiki/branches/rack/plugin/01sp.rb	2009-09-10 14:02:28 UTC (rev 1064)
@@ -131,7 +131,7 @@
 end
 
 # things needed to configure this plugin
-if SP_PREFIX ==****@cgi*****['conf']
+if SP_PREFIX ==****@reque*****['conf']
   # list of plugins
   @sp_opt = sp_hash_from_dirs( @sp_path )
 
@@ -141,7 +141,7 @@
     @conf["#{SP_PREFIX}.selected"] = ''
     @conf["#{SP_PREFIX}.notselected"] = ''
     @sp_opt.each_key do |file|
-      if 't' ==****@cgi*****["#{SP_PREFIX}.#{file}"]
+      if 't' ==****@reque*****["#{SP_PREFIX}.#{file}"]
         @conf["#{SP_PREFIX}.selected"] << "#{file}\n"
       else
         @conf["#{SP_PREFIX}.notselected"] << "#{file}\n"




Hiki-cvs メーリングリストの案内
Back to archive index