[Slashdotjp-dev 1238] [766] A number of entries in journal slashbox is from constant " journal_top"

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 9月 24日 (水) 13:21:58 JST


Revision: 766
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=766
Author:   tach
Date:     2008-09-24 13:21:58 +0900 (Wed, 24 Sep 2008)

Log Message:
-----------
A number of entries in journal slashbox is from constant "journal_top"

Modified Paths:
--------------
    slashjp/branches/2.5.0.192/debian/changelog
    slashjp/branches/2.5.0.192/plugins/Journal/journal_update_slashbox.pl


-------------- next part --------------
Modified: slashjp/branches/2.5.0.192/debian/changelog
===================================================================
--- slashjp/branches/2.5.0.192/debian/changelog	2008-09-19 05:34:58 UTC (rev 765)
+++ slashjp/branches/2.5.0.192/debian/changelog	2008-09-24 04:21:58 UTC (rev 766)
@@ -2,8 +2,9 @@
 
   * Add getThemeType() method to check theme type
     into plugin/Journal/Journal.pm
+  * A number of entries in journal slashbox is from constant "journal_top"
 
- -- Taku YASUI <tach****@osdn*****>  Fri, 19 Sep 2008 03:46:04 +0000
+ -- Taku YASUI <tach****@osdn*****>  Wed, 24 Sep 2008 04:20:24 +0000
 
 slash (2.5.0.192-18) unstable; urgency=low
 

Modified: slashjp/branches/2.5.0.192/plugins/Journal/journal_update_slashbox.pl
===================================================================
--- slashjp/branches/2.5.0.192/plugins/Journal/journal_update_slashbox.pl	2008-09-19 05:34:58 UTC (rev 765)
+++ slashjp/branches/2.5.0.192/plugins/Journal/journal_update_slashbox.pl	2008-09-24 04:21:58 UTC (rev 766)
@@ -18,6 +18,7 @@
 	my($virtual_user, $constants, $slashdb, $user) = @_;
 	my $force = $constants->{task_options}{force} || undef;
 	my $block_suffix = '_topjournals';
+	my $limit = getCurrentStatic('journal_top') || 10;
 	my $skins = $slashdb->getSkins();
 
 	foreach my $skin (values(%$skins)) {
@@ -37,7 +38,7 @@
 			'nickname AS author,jid,description AS title',
 			'users_journal JOIN users USING (uid) JOIN journals on (users_journal.jid=journals.id)',
 			$where,
-			'ORDER BY users_journal.date DESC LIMIT 20',
+			"ORDER BY users_journal.date DESC LIMIT $limit",
 		);
 		map { $_->{'link'} = "$constants->{absolutedir}/~" . strip_paramattr($_->{author}) . "/journal/". $_->{jid} } @$result;
 


Slashdotjp-dev メーリングリストの案内
Back to archive index