r44882 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44881‎ | r44882 | r44883 >
Date:21:39, 21 December 2008
Author:aaron
Status:deferred
Tags:
Comment:
* (Bug 16636) Add "diff to last sighted version" to watchlist
* Rename function
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -416,7 +416,8 @@
417417 $wgHooks['ImagePageFileHistoryLine'][] = 'FlaggedRevsHooks::addToFileHistLine';
418418 # Mark items in RC
419419 $wgHooks['SpecialRecentChangesQuery'][] = 'FlaggedRevsHooks::addToRCQuery';
420 -$wgHooks['ChangesListInsertArticleLink'][] = 'FlaggedRevsHooks::addToRCLine';
 420+$wgHooks['SpecialWatchlistQuery'][] = 'FlaggedRevsHooks::addToWatchlistQuery';
 421+$wgHooks['ChangesListInsertArticleLink'][] = 'FlaggedRevsHooks::addTochangeListLine';
421422 # Mark items in user contribs
422423 $wgHooks['ContribsPager::getQueryInfo'][] = 'FlaggedRevsHooks::addToContribsQuery';
423424 $wgHooks['ContributionsLineEnding'][] = 'FlaggedRevsHooks::addToContribsLine';
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -1227,6 +1227,13 @@
12281228 return true;
12291229 }
12301230
 1231+ public static function addToWatchlistQuery( &$conds, &$tables, &$join_conds, &$fields ) {
 1232+ $tables[] = 'flaggedpages';
 1233+ $fields[] = 'fp_stable';
 1234+ $join_conds['flaggedpages'] = array( 'LEFT JOIN', 'fp_page_id = rc_cur_id' );
 1235+ return true;
 1236+ }
 1237+
12311238 public static function addToHistLine( &$history, $row, &$s ) {
12321239 return FlaggedArticle::getInstance( $history->getArticle() )->addToHistLine( $history, $row, $s );
12331240 }
@@ -1247,7 +1254,7 @@
12481255 return true;
12491256 }
12501257
1251 - public static function addToRCLine( &$list, &$articlelink, &$s, &$rc, $unpatrolled, $watched ) {
 1258+ public static function addTochangeListLine( &$list, &$articlelink, &$s, &$rc, $unpatrolled, $watched ) {
12521259 global $wgUser;
12531260 if( $rc->getTitle()->getNamespace() < 0 || !isset($rc->mAttribs['fp_stable']) )
12541261 return true; // reviewed pages only

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r44596* Rewrite query the new way. Should make bug 16636 easier....aaron21:47, 14 December 2008

Status & tagging log