r116 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r115‎ | r116 | r117 >
Date:09:52, 11 February 2002
Author:hidders
Status:old
Tags:
Comment:
remove unnecessary outer join
Modified paths:
  • /trunk/phpwiki/fpw/special_recentchanges.php (modified) (history)

Diff [purge]

Index: trunk/phpwiki/fpw/special_recentchanges.php
@@ -117,19 +117,19 @@
118118 o1.old_comment AS cur_comment, o1.old_user AS cur_user,
119119 o1.old_user_text AS cur_user_text, o1.old_minor_edit,
120120 COUNT(DISTINCT o2.old_id ) AS changes
121 - FROM old AS o1 LEFT OUTER JOIN old AS o2
122 - ON o1.old_title = o2.old_title
123 - AND o2.old_timestamp > SUBDATE(CURRENT_TIMESTAMP, INTERVAL 3 DAY)
124 - AND o2.old_old_version <> 0 AND o2.old_minor_edit != 1
125 - $fromCondOld2
126 - WHERE o1.old_timestamp > SUBDATE(CURRENT_TIMESTAMP, INTERVAL 3 DAY)
127 - AND o1.old_minor_edit != 1
128 - $fromCondOld1
 121+ FROM old AS o1, old AS o2
 122+ WHERE o1.old_title = o2.old_title
 123+ AND o2.old_timestamp > SUBDATE(CURRENT_TIMESTAMP, INTERVAL $daysAgo DAY)
 124+ AND o2.old_old_version <> 0 AND o2.old_minor_edit != 1
 125+ $fromCondOld2
 126+ AND o1.old_timestamp > SUBDATE(CURRENT_TIMESTAMP, INTERVAL $daysAgo DAY)
 127+ AND o1.old_minor_edit != 1
 128+ $fromCondOld1
129129 GROUP BY o1.old_title, o1.old_timestamp
130130 HAVING cur_timestamp = MAX(o2.old_timestamp)
131131 ORDER BY o1.old_title
132132 LIMIT $maxcnt";
133 -
 133+
134134 # store result in $arr2
135135 $arr2 = array () ;
136136 $result = mysql_query ( $sql2 , $connection ) ;

Status & tagging log