/[suikacvs]/test/html-webhacc/cc.cgi
Suika

Diff of /test/html-webhacc/cc.cgi

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

revision 1.7 by wakaba, Sun Jul 1 06:21:46 2007 UTC revision 1.8 by wakaba, Sun Jul 1 10:02:24 2007 UTC
# Line 23  my $http = SuikaWiki::Input::HTTP->new; Line 23  my $http = SuikaWiki::Input::HTTP->new;
23    
24  ## TODO: _charset_  ## TODO: _charset_
25    
26      if ($http->meta_variable ('PATH_INFO') ne '/') {
27        print STDOUT "Status: 404 Not Found\nContent-Type: text/plain; charset=us-ascii\n\n400";
28        exit;
29      }
30    
31    my $input_format = $http->parameter ('i') || 'text/html';    my $input_format = $http->parameter ('i') || 'text/html';
32    my $inner_html_element = $http->parameter ('e');    my $inner_html_element = $http->parameter ('e');
33    my $input_uri = 'thismessage:/';    my $input_uri = 'thismessage:/';
# Line 97  my $http = SuikaWiki::Input::HTTP->new; Line 102  my $http = SuikaWiki::Input::HTTP->new;
102        $opt{line} = $opt{line} - 1 || 1;        $opt{line} = $opt{line} - 1 || 1;
103        print STDOUT qq[<dt class="$cls"><a href="#line-$opt{line}">Line $opt{line}</a></dt>\n];        print STDOUT qq[<dt class="$cls"><a href="#line-$opt{line}">Line $opt{line}</a></dt>\n];
104      }      }
105        $opt{type} =~ tr/ /-/;
106        $opt{type} =~ s/\|/%7C/g;
107        $msg .= qq[ [<a href="../error-description#$opt{type}">Description</a>]];
108      print STDOUT qq[<dd class="$cls">$msg</dd>\n];      print STDOUT qq[<dd class="$cls">$msg</dd>\n];
109    };    };
110    
# Line 190  my $http = SuikaWiki::Input::HTTP->new; Line 198  my $http = SuikaWiki::Input::HTTP->new;
198      my $onerror = sub {      my $onerror = sub {
199        my %opt = @_;        my %opt = @_;
200        my ($cls, $msg) = get_text ($opt{type}, $opt{level});        my ($cls, $msg) = get_text ($opt{type}, $opt{level});
201          $opt{type} = $opt{level} . ':' . $opt{type} if defined $opt{level};
202          $opt{type} =~ tr/ /-/;
203          $opt{type} =~ s/\|/%7C/g;
204          $msg .= qq[ [<a href="../error-description#$opt{type}">Description</a>]];
205        print STDOUT qq[<dt class="$cls">] . get_node_link ($opt{node}) .        print STDOUT qq[<dt class="$cls">] . get_node_link ($opt{node}) .
206            qq[</dt>\n<dd class="$cls">], $msg, "</dd>\n";            qq[</dt>\n<dd class="$cls">], $msg, "</dd>\n";
207      };      };

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24