diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-07-03 20:39:05 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-07-03 20:39:05 +0800 |
commit | fc8b2f454c143afe6358ff8e811d915dd19c85e3 (patch) | |
tree | 6a72b12c66475406574e46171037728028c0397a /staticweb/man.pl | |
parent | 34e6536caf900ca1ee54d72dedb00fd2eb56bf89 (diff) | |
download | pttbbs-fc8b2f454c143afe6358ff8e811d915dd19c85e3.tar pttbbs-fc8b2f454c143afe6358ff8e811d915dd19c85e3.tar.gz pttbbs-fc8b2f454c143afe6358ff8e811d915dd19c85e3.tar.bz2 pttbbs-fc8b2f454c143afe6358ff8e811d915dd19c85e3.tar.lz pttbbs-fc8b2f454c143afe6358ff8e811d915dd19c85e3.tar.xz pttbbs-fc8b2f454c143afe6358ff8e811d915dd19c85e3.tar.zst pttbbs-fc8b2f454c143afe6358ff8e811d915dd19c85e3.zip |
*** empty log message ***
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@1007 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'staticweb/man.pl')
-rwxr-xr-x | staticweb/man.pl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/staticweb/man.pl b/staticweb/man.pl index 307108c7..db5b84d5 100755 --- a/staticweb/man.pl +++ b/staticweb/man.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: man.pl,v 1.1 2003/07/03 06:49:23 in2 Exp $ +# $Id: man.pl,v 1.2 2003/07/03 12:39:05 in2 Exp $ use CGI qw/:standard/; use lib qw/./; use LocalVars; @@ -30,11 +30,14 @@ sub main print header(); $rh = (($fpath =~ m|/$|) ? dirmode($fpath) : articlemode($fpath)); + $rh->{brdname} = $brdname; $tmpl = Template->new({INCLUDE_PATH => '.', ABSOLUTE => 0, RELATIVE => 0, RECURSION => 0, - EVAL_PERL => 0}); + EVAL_PERL => 0, + COMPILE_EXT => '.tmpl', + COMPILE_DIR => $MANCACHE}); $tmpl->process($rh->{tmpl}, $rh); } @@ -52,6 +55,7 @@ sub dirmode } $th{tmpl} = 'dir.html'; + $th{isroot} = ($fpath eq '/') ? 1 : 0; return \%th; } @@ -60,6 +64,7 @@ sub articlemode my(%th); $th{tmpl} = 'article.html'; $th{content} = $db{$fpath}; + $th{content} =~ s/\033\[.*?m//g; return \%th; } |