/[pub]/suikawiki/script/lib/suikawiki.pl
Suika

Diff of /suikawiki/script/lib/suikawiki.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by w, Thu Jul 17 23:59:12 2003 UTC revision 1.10 by wakaba, Sun Jul 27 05:57:28 2003 UTC
# Line 183  sub do_write { Line 183  sub do_write {
183            $database->STORE ($form{mypage} => $form{mymsg}, -touch => 0);            $database->STORE ($form{mypage} => $form{mymsg}, -touch => 0);
184          }          }
185          $database->meta (IsFrozen => $form{mypage} => 0 + $form{myfrozen});          $database->meta (IsFrozen => $form{mypage} => 0 + $form{myfrozen});
186          my $uri = SuikaWiki::Plugin->_uri_wiki_page ($form{mypage}, mode => ($form{after_edit_cmd}||'default'), with_lm => 1);          my $uri = SuikaWiki::Plugin->_uri_wiki_page ($form{mypage}, mode => ($form{after_edit_cmd}||'default'), with_lm => 1, absolute => 1);
187          $uri .= qq(;after_edit_cmd=@{[SuikaWiki::Plugin->encode($form{after_edit_cmd})]}) if $form{after_edit_cmd};          $uri .= qq(;after_edit_cmd=@{[SuikaWiki::Plugin->encode($form{after_edit_cmd})]}) if $form{after_edit_cmd};
188          if ($form{__comment_anchor_index}) {          if ($form{__comment_anchor_index}) {
189              $uri .= qq(#anchor-$form{__comment_anchor_index});              $uri .= qq(#anchor-$form{__comment_anchor_index});
# Line 199  sub do_write { Line 199  sub do_write {
199    
200  sub _http_see_other (%) {  sub _http_see_other (%) {
201    my %o = @_;    my %o = @_;
202    $o{uri} ||= SuikaWiki::Plugin->_uri_wiki_page ($o{page});    $o{uri} ||= SuikaWiki::Plugin->_uri_wiki_page ($o{page}, absolute => 1);
203    if ($o{alternate_view} && ($main::ENV{SERVER_PROTOCOL} eq 'HTTP/0.9'    if ($o{alternate_view} && ($main::ENV{SERVER_PROTOCOL} eq 'HTTP/0.9'
204                            || $main::ENV{SERVER_PROTOCOL} eq 'HTTP/1.0')) {                            || $main::ENV{SERVER_PROTOCOL} eq 'HTTP/1.0')
205       && !($main::UA =~ m#Microsoft Internet Explorer|Mozilla#)) {
206      &_do_view_msg (-view => $o{alternate_view}, -page => $o{page}, -goto => $o{uri}, -o => $o{o});      &_do_view_msg (-view => $o{alternate_view}, -page => $o{page}, -goto => $o{uri}, -o => $o{o});
207    } else {    } else {
208          my $status = q(303 See Other);
209          if ($main::UA =~ m!Mozilla/[0-4]\.|Microsoft Internet Explorer!) {
210              $status = q(302 See Other);
211          }
212      my $euri = SuikaWiki::Plugin->escape ($o{uri});      my $euri = SuikaWiki::Plugin->escape ($o{uri});
213      print qq(Status: 303 See Other      print qq(Status: $status
214  Location: $o{uri}  Location: $o{uri}
215  Content-Type: text/html  Content-Type: text/html
216  Content-Language: en  Content-Language: en
217    
218  <!DOCTYPE p SYSTEM>  <!DOCTYPE p SYSTEM>
219  <p>See &lt;<a href="$euri">$euri</a>&gt;</p>);  <p>See &lt;<a href="$euri">$euri</a>&gt;.</p>);
220    }    }
221    _wiki_exit ();    _wiki_exit ();
222  }  }
223    
224  sub _compatible_options () {  sub _compatible_options () {
225    (use_anchor_name => ($main::UA =~ m#Mozilla/[12]\.|Microsoft Internet Explorer# ? 1 : 0));    (use_anchor_name => ($main::UA =~ m#Mozilla/[1-4]\.|Microsoft Internet Explorer# ? 1 : 0));
226  }  }
227    
228    
# Line 253  sub print_header ($;%) { Line 258  sub print_header ($;%) {
258                  (namespace_uri => $NS_XHTML1, local_name => 'meta')) {                  (namespace_uri => $NS_XHTML1, local_name => 'meta')) {
259            $_->set_attribute ('http-equiv' => 'refresh');            $_->set_attribute ('http-equiv' => 'refresh');
260            $_->set_attribute (content => "0; url=$option{-goto}");            $_->set_attribute (content => "0; url=$option{-goto}");
261              $_->option (use_EmptyElemTag => 1);
262          }          }
263        } else {        } else {
264          $option{-goto} =~ tr/;/&/ if $UA =~ m#Mozilla/[1-4]\.#;          $option{-goto} =~ tr/;/&/ if $UA =~ m#Mozilla/[1-4]\.#;
# Line 261  sub print_header ($;%) { Line 267  sub print_header ($;%) {
267                  (namespace_uri => $NS_XHTML1, local_name => 'meta')) {                  (namespace_uri => $NS_XHTML1, local_name => 'meta')) {
268            $_->set_attribute ('http-equiv' => 'refresh');            $_->set_attribute ('http-equiv' => 'refresh');
269            $_->set_attribute (content => qq(0; url="$option{-goto}"));            $_->set_attribute (content => qq(0; url="$option{-goto}"));
270              $_->option (use_EmptyElemTag => 1);
271          }          }
272        }        }
273      }      }
# Line 474  EOH Line 481  EOH
481      <input type="hidden" name="myLastModified" value="$option{last_modified}" />      <input type="hidden" name="myLastModified" value="$option{last_modified}" />
482      <input type="hidden" name="mycmd" value="write" />      <input type="hidden" name="mycmd" value="write" />
483      <input type="hidden" name="mypage" value="@{[SuikaWiki::Plugin->escape($form{mypage})]}" />      <input type="hidden" name="mypage" value="@{[SuikaWiki::Plugin->escape($form{mypage})]}" />
484      <textarea cols="@{[SuikaWiki::Plugin->resource('Edit:Form:Cols')+0||80]}" rows="@{[SuikaWiki::Plugin->resource('Edit:Form:Rows')+0||20]}" name="mymsg" tabindex="1">@{[SuikaWiki::Plugin->escape($option{content})]}</textarea><br />      <textarea cols="@{[SuikaWiki::Plugin->resource('Edit:Form:Cols')+0||35]}" rows="@{[SuikaWiki::Plugin->resource('Edit:Form:Rows')+0||15]}" name="mymsg" tabindex="1"@{[$main::UA =~ m{Mozilla/[0-4]\.} ? ' wrap="physical"':'']}>@{[SuikaWiki::Plugin->escape($option{content})]}</textarea><br />
485  @{[  @{[
486      $option{admin} ?      $option{admin} ?
487      qq(      qq(

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24