From 3e8d663fe18c0760a2eba3b0d2fbde768d9ac41a Mon Sep 17 00:00:00 2001 From: Leon Weber Date: Sat, 23 Dec 2006 23:08:41 +0000 Subject: [PATCH] * (bug 8331) Added the change size value to watchlists; therefor made watchlists use RecentChange::newFromRow() instead of newFromCurRow() --- RELEASE-NOTES | 2 ++ includes/RecentChange.php | 6 +++--- includes/SpecialWatchlist.php | 11 ++--------- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index da8b598e2d..a3edc0ebd7 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -398,6 +398,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 7612) Remove superfluous link to Special:Categories from result items on Special:Mostcategories * {{PLURAL:}} now handles formatted numbers correctly +* (bug 8331) Added the change size value to watchlists; therefor made + watchlists use RecentChange::newFromRow() instead of newFromCurRow() == Languages updated == diff --git a/includes/RecentChange.php b/includes/RecentChange.php index 998e5e45a4..c88a9f7f8b 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -437,7 +437,7 @@ class RecentChange $this->mExtra = array(); } - # Makes a pseudo-RC entry from a cur row, for watchlists and things + # Makes a pseudo-RC entry from a cur row function loadFromCurRow( $row ) { $this->mAttribs = array( @@ -460,8 +460,8 @@ class RecentChange 'rc_id' => $row->rc_id, 'rc_patrolled' => $row->rc_patrolled, 'rc_new' => $row->page_is_new, # obsolete - 'rc_old_len' => NULL, # we can't get the text lengts from a cur row - 'rc_new_len' => NULL, + 'rc_old_len' => $row->rc_old_len, + 'rc_new_len' => $row->rc_new_len, ); $this->mExtra = array(); diff --git a/includes/SpecialWatchlist.php b/includes/SpecialWatchlist.php index 3232bf61b6..f149bcbbff 100644 --- a/includes/SpecialWatchlist.php +++ b/includes/SpecialWatchlist.php @@ -283,14 +283,7 @@ function wfSpecialWatchlist( $par ) { "\n\n" ); } - $sql = "SELECT - rc_namespace AS page_namespace, rc_title AS page_title, - rc_comment AS rev_comment, rc_cur_id AS page_id, - rc_user AS rev_user, rc_user_text AS rev_user_text, - rc_timestamp AS rev_timestamp, rc_minor AS rev_minor_edit, - rc_this_oldid AS rev_id, - rc_last_oldid, rc_id, rc_patrolled, - rc_new AS page_is_new,wl_notificationtimestamp + $sql = "SELECT * FROM $watchlist,$recentchanges,$page WHERE wl_user=$uid AND wl_namespace=rc_namespace @@ -365,7 +358,7 @@ function wfSpecialWatchlist( $par ) { $counter = 1; while ( $obj = $dbr->fetchObject( $res ) ) { # Make fake RC entry - $rc = RecentChange::newFromCurRow( $obj, $obj->rc_last_oldid ); + $rc = RecentChange::newFromRow( $obj ); $rc->counter = $counter++; if ( $wgShowUpdatedMarker ) { -- 2.20.1