[Slashdotjp-dev 313] CVS update: slashjp/plugins/Journal

アーカイブの一覧に戻る

Taku YASUI tach****@users*****
2005年 11月 18日 (金) 01:46:14 JST


Index: slashjp/plugins/Journal/Journal.pm
diff -u slashjp/plugins/Journal/Journal.pm:1.3 slashjp/plugins/Journal/Journal.pm:1.4
--- slashjp/plugins/Journal/Journal.pm:1.3	Fri Nov 18 01:01:04 2005
+++ slashjp/plugins/Journal/Journal.pm	Fri Nov 18 01:46:14 2005
@@ -1,7 +1,7 @@
 # This code is a part of Slash, and is released under the GPL.
 # Copyright 1997-2003 by Open Source Development Network. See README
 # and COPYING for more information, or see http://slashcode.com/.
-# $Id: Journal.pm,v 1.3 2005/11/17 16:01:04 tach Exp $
+# $Id: Journal.pm,v 1.4 2005/11/17 16:46:14 tach Exp $
 
 package Slash::Journal;
 
@@ -15,7 +15,7 @@
 use base 'Exporter';
 use base 'Slash::DB::MySQL';
 
-($VERSION) = ' $Revision: 1.3 $ ' =~ /\$Revision:\s+([^\s]+)/;
+($VERSION) = ' $Revision: 1.4 $ ' =~ /\$Revision:\s+([^\s]+)/;
 
 # On a side note, I am not sure if I liked the way I named the methods either.
 # -Brian
@@ -211,10 +211,9 @@
 	$self->sqlConnect;
 
 	my $sql = <<EOT;
-SELECT count(j.uid) AS c, u.nickname, j.uid, MAX(date), MAX(id)
-FROM journals AS j, users AS u
-WHERE j.uid = u.uid
-GROUP BY u.nickname ORDER BY c DESC
+SELECT count AS c,nickname,users_journal.uid,date,jid AS id
+FROM users_journal JOIN users USING (uid)
+ORDER BY count DESC
 LIMIT $limit
 EOT
 
@@ -240,10 +239,8 @@
 	$self->sqlConnect;
 
 	my $sql = <<EOT;
-SELECT count(j.id), u.nickname, u.uid, MAX(j.date) AS date, MAX(id)
-FROM journals AS j, users AS u
-WHERE j.uid = u.uid
-GROUP BY u.nickname
+SELECT count AS c,nickname,users_journal.uid,date,jid AS id
+FROM users_journal JOIN users USING (uid)
 ORDER BY date DESC
 LIMIT $limit
 EOT


Slashdotjp-dev メーリングリストの案内
アーカイブの一覧に戻る