diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-05-26 10:57:15 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-05-26 10:57:15 +0800 |
commit | 174929f085c6a82ce6ac03a0e7f231f09e7e1354 (patch) | |
tree | 118ebc8072efd500e5503045fd6c37516cc1a8c5 /blog/blog.pl | |
parent | e76cdb99c7654e691e6d2eb3f92af0f80121d124 (diff) | |
download | pttbbs-174929f085c6a82ce6ac03a0e7f231f09e7e1354.tar pttbbs-174929f085c6a82ce6ac03a0e7f231f09e7e1354.tar.gz pttbbs-174929f085c6a82ce6ac03a0e7f231f09e7e1354.tar.bz2 pttbbs-174929f085c6a82ce6ac03a0e7f231f09e7e1354.tar.lz pttbbs-174929f085c6a82ce6ac03a0e7f231f09e7e1354.tar.xz pttbbs-174929f085c6a82ce6ac03a0e7f231f09e7e1354.tar.zst pttbbs-174929f085c6a82ce6ac03a0e7f231f09e7e1354.zip |
apply outputfilter at short
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@900 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'blog/blog.pl')
-rwxr-xr-x | blog/blog.pl | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/blog/blog.pl b/blog/blog.pl index 12d67328..d4dcc426 100755 --- a/blog/blog.pl +++ b/blog/blog.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: blog.pl,v 1.5 2003/05/26 02:30:04 in2 Exp $ +# $Id: blog.pl,v 1.6 2003/05/26 02:57:15 in2 Exp $ use CGI qw/:standard/; use LocalVars; use DB_File; @@ -49,7 +49,7 @@ sub main if( $attr{"$fn.loadBlog"} =~ /article/i ){ AddArticle('blog', $attr{"$fn.loadBlogFields"}, packdate($y, $m, $d)); } - elsif( $attr{"$fn.loadBlog"} =~ /month/i ){ + elsif( $attr{"$fn.loadBlog"} =~ /monthly/i ){ my($s, $y1, $m1, $d1); for( ($y1, $m1, $d1) = ($y, $m, 32) ; $d1 > 0 ; --$d1 ){ AddArticle('blog', $attr{"$fn.loadBlogFields"}, @@ -193,13 +193,19 @@ sub main sub AddArticle($$$) { my($cl, $fields, $s) = @_; - my $content = ''; + my($content, $short) = (); if( $fields =~ /content/i ){ $content = $article{"$s.content"}; if( $config{outputfilter} == 1 ){ $content =~ s/\n/<br \/>\n/gs; } } + if( $fields =~ /short/i ){ + $short = $article{"$s.short"}; + if( $config{outputfilter} == 1 ){ + $short =~ s/\n/<br \/>\n/gs; + } + } my($y, $m, $d) = unpackdate($s); push @{$th{$cl}}, {year => $y, @@ -213,8 +219,7 @@ sub AddArticle($$$) content=> $content, author => (($fields !~ /author/i) ? '' : $article{"$s.author"}), - short => (($fields !~ /short/i) ? '' : - $article{"$s.short"}), + short => $short, } if( $article{"$s.title"} ); } |