* (bug 20131) PHP Notice: Undfined index: page_latest in includes/ChangesList.php...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 8 Aug 2009 20:47:11 +0000 (20:47 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 8 Aug 2009 20:47:11 +0000 (20:47 +0000)
Special:Recentchangeslinked now also selects the 'page_latest' field for users having the 'rollback' right, as Special:Recentchanges does

RELEASE-NOTES
includes/specials/SpecialRecentchangeslinked.php

index 5b9599e..2cacdc2 100644 (file)
@@ -404,6 +404,8 @@ this. Was used when mwEmbed was going to be an extension.
 * (bug 19289) importDump.php can now handle bzip2 and 7zip
 * (bug 20103) Add after the link for "My Talk" a info with the number of the
   new messages for the user
+* (bug 20131) Fixed a PHP notice for users having the "rollback" right on
+  Special:RecentChangesLinked
 
 == API changes in 1.16 ==
 
index 3905b43..a5bd098 100644 (file)
@@ -84,6 +84,11 @@ class SpecialRecentchangeslinked extends SpecialRecentchanges {
                        $select[] = 'wl_user';
                        $join_conds['watchlist'] = array( 'LEFT JOIN', "wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace" );
                }
+               if ( $wgUser->isAllowed( 'rollback' ) ) {
+                       $tables[] = 'page';
+                       $join_conds['page'] = array('LEFT JOIN', 'rc_cur_id=page_id');
+                       $select[] = 'page_latest';
+               }
 
                ChangeTags::modifyDisplayQuery( $tables, $select, $conds, $join_conds,
                        $query_options, $opts['tagfilter'] );