diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-06-14 11:55:10 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-06-14 11:55:10 +0800 |
commit | 8c5d345c3b5e90e7aea1b3f9f61f215ab2fcb7cc (patch) | |
tree | 286ee7137e998f6dae1f169d0d99ff6c260f4147 | |
parent | ec3b0ea994407ad5ff4364532d531d3368eb72b3 (diff) | |
download | pttbbs-8c5d345c3b5e90e7aea1b3f9f61f215ab2fcb7cc.tar pttbbs-8c5d345c3b5e90e7aea1b3f9f61f215ab2fcb7cc.tar.gz pttbbs-8c5d345c3b5e90e7aea1b3f9f61f215ab2fcb7cc.tar.bz2 pttbbs-8c5d345c3b5e90e7aea1b3f9f61f215ab2fcb7cc.tar.lz pttbbs-8c5d345c3b5e90e7aea1b3f9f61f215ab2fcb7cc.tar.xz pttbbs-8c5d345c3b5e90e7aea1b3f9f61f215ab2fcb7cc.tar.zst pttbbs-8c5d345c3b5e90e7aea1b3f9f61f215ab2fcb7cc.zip |
support 'all' in loadTopBlogs
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@939 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rwxr-xr-x | blog/blog.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/blog/blog.pl b/blog/blog.pl index 0dc59914..07b72011 100755 --- a/blog/blog.pl +++ b/blog/blog.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: blog.pl,v 1.19 2003/06/10 08:46:06 in2 Exp $ +# $Id: blog.pl,v 1.20 2003/06/14 03:55:10 in2 Exp $ use CGI qw/:standard/; use lib qw/./; use LocalVars; @@ -118,7 +118,8 @@ sub main my($dbh) = @_; my($sth); $sth = $dbh->prepare("select k, v from counter order by v desc ". - "limit 0,". $attr{"$fn.loadTopBlogs"}); + ($attr{"$fn.loadTopBlogs"} eq 'all' ? '' : + 'limit 0,'. $attr{"$fn.loadTopBlogs"})); $sth->execute(); while( $_ = $sth->fetchrow_hashref() ){ push @{$th{topBlogs}}, {brdname => $_->{k}, |