[Hiki-dev] $cgi_nameとタイトルが空のケースへのパッチ

アーカイブの一覧に戻る

Yoshimi KURUMA yoshi****@iris*****
2003年 4月 22日 (火) 01:57:27 JST


はじめまして。yoshimiです。

開発版の先端で、
1.$cgi_nameを忘れている
2.タイトルが空の場合のチェック
のパッチです。


Index: hiki/command.rb
===================================================================
RCS file: /cvsroot/hiki/hiki/hiki/command.rb,v
retrieving revision 1.4.2.11
diff -u -r1.4.2.11 command.rb
--- hiki/command.rb	15 Apr 2003 14:14:44 -0000	1.4.2.11
+++ hiki/command.rb	21 Apr 2003 16:56:23 -0000
@@ -340,7 +340,7 @@
       p = @params['key'][0]
       if p
         @p = p.to_euc
-        if /^\./ =~ @p || @p.size > $max_name_size
+        if /^\./ =~ @p || @p.size > $max_name_size || @p.size == 0
           @params['key'][0] = nil
           cmd_create( msg_invalid_filename( $max_name_size) )
           return
Index: hiki/util.rb
===================================================================
RCS file: /cvsroot/hiki/hiki/hiki/util.rb,v
retrieving revision 1.5.2.9
diff -u -r1.5.2.9 util.rb
--- hiki/util.rb	14 Apr 2003 15:14:58 -0000	1.5.2.9
+++ hiki/util.rb	21 Apr 2003 16:56:24 -0000
@@ -120,7 +120,7 @@
     end
 
     def cmdstr( cmd, param )
-      "?c=#{cmd};#{param}"
+      "#{$cgi_name}?c=#{cmd};#{param}"
     end
 
     def title( s )
Index: template/en/adminform.html
===================================================================
RCS file: /cvsroot/hiki/hiki/template/en/adminform.html,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 adminform.html
--- template/en/adminform.html	14 Apr 2003 15:15:00 -0000	1.1.2.4
+++ template/en/adminform.html	21 Apr 2003 16:56:24 -0000
@@ -18,7 +18,7 @@
 
 <p id=msg></p>
 
-<form method="post" action="hiki.cgi">
+<form method="post" action="#{$cgi_name}">
   <input type=hidden value=admin name=c>
   <div class="conf_day">
     <h2><span class="title">Basic preferences</span></h2>
Index: template/en/edit.html
===================================================================
RCS file: /cvsroot/hiki/hiki/template/en/edit.html,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 edit.html
--- template/en/edit.html	14 Apr 2003 15:15:00 -0000	1.1.2.4
+++ template/en/edit.html	21 Apr 2003 16:56:24 -0000
@@ -22,7 +22,7 @@
         <div id=freeze_msg class="msg"></div>
         <div id="preview" class="comment"></div>
         <pre id=differ></pre>
-        <form action="hiki.cgi" method="POST">
+        <form action="#{$cgi_name}" method="POST">
           <input type="hidden" name="p" id=pagename>
           <input type="hidden" name="c" value="save">
           <input type="hidden" name="md5hex" id=md5hex>
Index: template/en/form.html
===================================================================
RCS file: /cvsroot/hiki/hiki/template/en/form.html,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 form.html
--- template/en/form.html	14 Apr 2003 15:15:00 -0000	1.1.2.4
+++ template/en/form.html	21 Apr 2003 16:56:24 -0000
@@ -22,7 +22,7 @@
           <li id=listitem></li>
         </ul>
         <div id=msg1></div>
-        <form action=hiki.cgi method=@method>
+        <form action=#{$cgi_name} method=@method>
           <input id=cmd type=hidden value=search name=c>
           <span id=msg2></span><input size=30 maxlength=50 name=key id=key>
           <input id=button type=submit value=Search> 
Index: template/ja/adminform.html
===================================================================
RCS file: /cvsroot/hiki/hiki/template/ja/adminform.html,v
retrieving revision 1.1.1.1.2.4
diff -u -r1.1.1.1.2.4 adminform.html
--- template/ja/adminform.html	14 Apr 2003 15:15:01 -0000	1.1.1.1.2.4
+++ template/ja/adminform.html	21 Apr 2003 16:56:24 -0000
@@ -17,7 +17,7 @@
 
 <p id=msg></p>
 
-<form method="post" action="hiki.cgi">
+<form method="post" action="#{$cgi_name}">
   <input type=hidden value=admin name=c>
   <div class="conf_day">
     <h2><span class="title">基本設定</span></h2>
Index: template/ja/edit.html
===================================================================
RCS file: /cvsroot/hiki/hiki/template/ja/edit.html,v
retrieving revision 1.2.2.4
diff -u -r1.2.2.4 edit.html
--- template/ja/edit.html	14 Apr 2003 15:15:01 -0000	1.2.2.4
+++ template/ja/edit.html	21 Apr 2003 16:56:24 -0000
@@ -22,7 +22,7 @@
         <div id=freeze_msg class="msg"></div>
         <div id="preview" class="comment"></div>
         <pre id=differ></pre>
-        <form action="hiki.cgi" method="POST">
+        <form action="#{$cgi_name}" method="POST">
           <input type="hidden" name="p" id=pagename>
           <input type="hidden" name="c" value="save">
           <input type="hidden" name="md5hex" id=md5hex>
Index: template/ja/form.html
===================================================================
RCS file: /cvsroot/hiki/hiki/template/ja/form.html,v
retrieving revision 1.1.1.1.2.4
diff -u -r1.1.1.1.2.4 form.html
--- template/ja/form.html	14 Apr 2003 15:15:01 -0000	1.1.1.1.2.4
+++ template/ja/form.html	21 Apr 2003 16:56:24 -0000
@@ -22,7 +22,7 @@
           <li id=listitem></li>
         </ul>
         <div id=msg1></div>
-        <form action=hiki.cgi method=@method>
+        <form action=#{$cgi_name} method=@method>
           <input id=cmd type=hidden value=search name=c>
           <span id=msg2></span><input size=30 maxlength=50 name=key id=key>
           <input id=button type=submit value=検索> 



Hiki-dev メーリングリストの案内
アーカイブの一覧に戻る