87 |
} |
} |
88 |
$$contentref = Jcode->new ($contentref, $srccode) |
$$contentref = Jcode->new ($contentref, $srccode) |
89 |
## Normalize FULLWIDTH characters and IDEOGRAPHIC SPACE |
## Normalize FULLWIDTH characters and IDEOGRAPHIC SPACE |
90 |
->tr ("\xA3\xB0-\xA3\xB9\xA3\xC1-\xA3\xDA\xA3\xE1-\xA3\xFA\xA1\xF5\xA1\xA4\xA1\xA5\xA1\xA7\xA1\xA8\xA1\xA9\xA1\xAA\xA1\xAE\xA1\xB0\xA1\xB2\xA1\xBF\xA1\xC3\xA1\xCA\xA1\xCB\xA1\xCE\xA1\xCF\xA1\xD0\xA1\xD1\xA1\xDC\xA1\xF0\xA1\xF3\xA1\xF4\xA1\xF6\xA1\xF7\xA1\xE1\xA1\xE4\xA1\xE3\xA1\xA1\xA2\xAF\xA2\xB0\xA2\xB2\xA2\xB1\xA1\xA1\xC0" => q(0-9A-Za-z&,.:;?!`^_/|()[]{}+$%#*@=>< '"~-)) |
->tr ("\xA3\xB0-\xA3\xB9\xA3\xC1-\xA3\xDA\xA3\xE1-\xA3\xFA\xA1\xF5\xA1\xA4\xA1\xA5\xA1\xA7\xA1\xA8\xA1\xA9\xA1\xAA\xA1\xAE\xA1\xB0\xA1\xB2\xA1\xBF\xA1\xC3\xA1\xCA\xA1\xCB\xA1\xCE\xA1\xCF\xA1\xD0\xA1\xD1\xA1\xDC\xA1\xF0\xA1\xF3\xA1\xF4\xA1\xF6\xA1\xF7\xA1\xE1\xA1\xE4\xA1\xE3\xA1\xA1\xA2\xAF\xA2\xB0\xA2\xB2\xA2\xB1" => q(0-9A-Za-z&,.:;?!`^_/|()[]{}+$%#*@=>< '"~-)) |
91 |
# ->tr (qq(\x8E\xDE\x8E\xDF) => qq(\xA1\xAB\xA1\xAC)) |
# ->tr (qq(\x8E\xDE\x8E\xDF) => qq(\xA1\xAB\xA1\xAC)) |
92 |
->h2z (1) |
->h2z (1) |
93 |
->$code; |
->$code; |
131 |
report SuikaWiki::View::Implementation::error |
report SuikaWiki::View::Implementation::error |
132 |
-type => 'WARN_VIEW_NOT_DEFINED', condition => $arg->{condition}, |
-type => 'WARN_VIEW_NOT_DEFINED', condition => $arg->{condition}, |
133 |
-object => $wiki->{view}, method => 'view_in_mode'; |
-object => $wiki->{view}, method => 'view_in_mode'; |
134 |
$wiki->view_in_mode (mode => '-error', method => 'GET'); |
$wiki->view_in_mode (mode => '-wv--no-view-definition', method => 'GET'); |
135 |
## TODO: cache control for non-GET |
## TODO: cache control for non-GET |
136 |
} else { |
} else { |
137 |
die "Some error occured. Additionally, error reporting mode not defined"; |
die "Some error occured. Additionally, error reporting mode not defined"; |
256 |
} else { |
} else { |
257 |
$page = $wiki->{input}->parameter ('mypage'); |
$page = $wiki->{input}->parameter ('mypage'); |
258 |
} |
} |
259 |
|
|
260 |
## TODO: SuikaWiki 3 WikiName |
## ISSUE: WikiName normalization needed |
261 |
$page =~ tr/\x00-\x20\x7F//d; |
$page =~ s/\s+/\x20/g; |
262 |
$page = SuikaWiki::Name::Space::normalize_name ($page); |
$page =~ s/^\x20//; $page =~ s/\x20+$//; |
263 |
|
$page =~ tr/\x00-\x1F\x7F//d; |
264 |
if ($page) { |
if ($page) { |
265 |
$wiki->{var}->{page} = [split '//', $page]; |
$wiki->{var}->{page} = $wiki->name ($page); |
266 |
} else { |
} else { |
267 |
$wiki->{var}->{page} = $wiki->{config}->{page}->{Default}; |
$wiki->{var}->{page} = $wiki->{config}->{page}->{Default}; |
268 |
} |
} |
306 |
} catch SuikaWiki::View::Implementation::error with { |
} catch SuikaWiki::View::Implementation::error with { |
307 |
my $err = shift; |
my $err = shift; |
308 |
$err->throw unless $err->{-type} eq 'ERROR_REPORTED'; |
$err->throw unless $err->{-type} eq 'ERROR_REPORTED'; |
309 |
|
} catch SuikaWiki::Format::Definition::error with { |
310 |
|
$WIKI->view_in_mode (mode => '-wf--converter-not-found'); |
311 |
} finally { |
} finally { |
312 |
$WIKI->close_input; |
$WIKI->close_input; |
313 |
$WIKI->close_db; |
$WIKI->close_db; |