[Slashdotjp-dev 1461] [992] Fix SQL to get top journals at journal_update_slashbox.pl

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 2月 6日 (金) 18:27:46 JST


Revision: 992
          http://svn.sourceforge.jp/view?root=slashdotjp&view=rev&rev=992
Author:   tach
Date:     2009-02-06 18:27:46 +0900 (Fri, 06 Feb 2009)

Log Message:
-----------
Fix SQL to get top journals at journal_update_slashbox.pl

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


-------------- next part --------------
Modified: slashjp/trunk/debian/changelog
===================================================================
--- slashjp/trunk/debian/changelog	2009-02-06 07:08:23 UTC (rev 991)
+++ slashjp/trunk/debian/changelog	2009-02-06 09:27:46 UTC (rev 992)
@@ -4,8 +4,9 @@
     submissions/stories/journals.
   * Remove "Index" topic on topic list at story editing from submission
     using constants "submission_remove_mainpage_nexus_tid"
+  * Fix SQL to get top journals at journal_update_slashbox.pl
 
- -- Taku YASUI <tach****@osdn*****>  Fri,  6 Feb 2009 04:39:49 +0000
+ -- Taku YASUI <tach****@osdn*****>  Fri,  6 Feb 2009 09:27:14 +0000
 
 slash (2.5.0.233-4) unstable; urgency=low
 

Modified: slashjp/trunk/plugins/Journal/journal_update_slashbox.pl
===================================================================
--- slashjp/trunk/plugins/Journal/journal_update_slashbox.pl	2009-02-06 07:08:23 UTC (rev 991)
+++ slashjp/trunk/plugins/Journal/journal_update_slashbox.pl	2009-02-06 09:27:46 UTC (rev 992)
@@ -39,10 +39,10 @@
 
 		slashdLog("Start updating block \"$name\"") if (verbosity() >= 3);
 		my $result = $slashdb->sqlSelectAllHashrefArray(
-			'nickname AS author,jid,description AS title',
-			'users_journal JOIN users USING (uid) JOIN journals on (users_journal.jid=journals.id)',
+			'nickname AS author,MAX(id) AS jid,description AS title',
+			'journals JOIN users USING (uid)',
 			$where,
-			"ORDER BY users_journal.date DESC LIMIT $limit",
+			"GROUP BY uid ORDER BY jid DESC LIMIT $limit",
 		);
 		map { $_->{'link'} = "$constants->{absolutedir}/~" . strip_paramattr($_->{author}) . "/journal/". $_->{jid} } @$result;
 



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