From b624a2a9579d6340f9a8b1f8342eec86775ec84f Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 20 Apr 2013 01:30:14 +0000 Subject: fix tag parser, theme cleanup --- index.cgi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'index.cgi') diff --git a/index.cgi b/index.cgi index e9e2c55..e61d166 100755 --- a/index.cgi +++ b/index.cgi @@ -76,9 +76,9 @@ if ( $path =~ m/^\/(\d{4})\/(\d{2})\/([^\/]+)$/ ) { @args = ( year => $1, month => $2 ); } elsif ( $path =~ m/^\/(\d{4})\/?$/ ) { @args = ( year => $1 ); -} elsif ( $path =~ m/^\/Page\/(\d+)$/ ) { +} elsif ( $path =~ m/^\/[Pp]age\/(\d+)$/ ) { @args = ( page => $1 ); -} elsif ( $path =~ m/^\/Tags\/(\w+)$/ ) { +} elsif ( $path =~ m/^\/[Tt]ags\/([\w_-]+)$/ ) { @args = ( tag => $1 ); } elsif ( $path =~ m/^\/rss\.xml$/ ) { $output = \&output_rss; @@ -125,6 +125,7 @@ sub output_article { } } else { $template->param( error => $page_not_found_error ); + $template->param( notfound => 1 ); @status = ( -status => '404 Not Found' ); } print $cgi->header(@status), $template->output; -- cgit v1.2.3