summaryrefslogtreecommitdiff
path: root/includes/SpecialRecentchangeslinked.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/SpecialRecentchangeslinked.php')
-rw-r--r--includes/SpecialRecentchangeslinked.php24
1 files changed, 11 insertions, 13 deletions
diff --git a/includes/SpecialRecentchangeslinked.php b/includes/SpecialRecentchangeslinked.php
index 2a611c4d..59a3beb5 100644
--- a/includes/SpecialRecentchangeslinked.php
+++ b/includes/SpecialRecentchangeslinked.php
@@ -71,6 +71,14 @@ function wfSpecialRecentchangeslinked( $par = NULL ) {
$uid = $wgUser->getID();
+ $GROUPBY = "
+ GROUP BY rc_cur_id,rc_namespace,rc_title,
+ rc_user,rc_comment,rc_user_text,rc_timestamp,rc_minor,
+ rc_new, rc_id, rc_this_oldid, rc_last_oldid, rc_bot, rc_patrolled, rc_type
+" . ($uid ? ",wl_user" : "") . "
+ ORDER BY rc_timestamp DESC
+ LIMIT {$limit}";
+
// If target is a Category, use categorylinks and invert from and to
if( $nt->getNamespace() == NS_CATEGORY ) {
$catkey = $dbr->addQuotes( $nt->getDBKey() );
@@ -97,11 +105,7 @@ function wfSpecialRecentchangeslinked( $par = NULL ) {
{$cmq}
AND cl_from=rc_cur_id
AND cl_to=$catkey
- GROUP BY rc_cur_id,rc_namespace,rc_title,
- rc_user,rc_comment,rc_user_text,rc_timestamp,rc_minor,
- rc_new
- ORDER BY rc_timestamp DESC
- LIMIT {$limit};
+$GROUPBY
";
} else {
$sql =
@@ -129,11 +133,8 @@ function wfSpecialRecentchangeslinked( $par = NULL ) {
AND pl_namespace=rc_namespace
AND pl_title=rc_title
AND pl_from=$id
-GROUP BY rc_cur_id,rc_namespace,rc_title,
- rc_user,rc_comment,rc_user_text,rc_timestamp,rc_minor,
- rc_new
-ORDER BY rc_timestamp DESC
- LIMIT {$limit}";
+$GROUPBY
+";
}
$res = $dbr->query( $sql, $fname );
@@ -156,9 +157,6 @@ ORDER BY rc_timestamp DESC
if ( 0 == $count ) { break; }
$obj = $dbr->fetchObject( $res );
--$count;
-# print_r ( $obj ) ;
-# print "<br/>\n" ;
-
$rc = RecentChange::newFromRow( $obj );
$rc->counter = $counter++;
$s .= $list->recentChangesLine( $rc , !empty( $obj->wl_user) );