Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -416,7 +416,8 @@ |
417 | 417 | $wgHooks['ImagePageFileHistoryLine'][] = 'FlaggedRevsHooks::addToFileHistLine'; |
418 | 418 | # Mark items in RC |
419 | 419 | $wgHooks['SpecialRecentChangesQuery'][] = 'FlaggedRevsHooks::addToRCQuery'; |
420 | | -$wgHooks['ChangesListInsertArticleLink'][] = 'FlaggedRevsHooks::addToRCLine'; |
| 420 | +$wgHooks['SpecialWatchlistQuery'][] = 'FlaggedRevsHooks::addToWatchlistQuery'; |
| 421 | +$wgHooks['ChangesListInsertArticleLink'][] = 'FlaggedRevsHooks::addTochangeListLine'; |
421 | 422 | # Mark items in user contribs |
422 | 423 | $wgHooks['ContribsPager::getQueryInfo'][] = 'FlaggedRevsHooks::addToContribsQuery'; |
423 | 424 | $wgHooks['ContributionsLineEnding'][] = 'FlaggedRevsHooks::addToContribsLine'; |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -1227,6 +1227,13 @@ |
1228 | 1228 | return true; |
1229 | 1229 | } |
1230 | 1230 | |
| 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 | + |
1231 | 1238 | public static function addToHistLine( &$history, $row, &$s ) { |
1232 | 1239 | return FlaggedArticle::getInstance( $history->getArticle() )->addToHistLine( $history, $row, $s ); |
1233 | 1240 | } |
— | — | @@ -1247,7 +1254,7 @@ |
1248 | 1255 | return true; |
1249 | 1256 | } |
1250 | 1257 | |
1251 | | - public static function addToRCLine( &$list, &$articlelink, &$s, &$rc, $unpatrolled, $watched ) { |
| 1258 | + public static function addTochangeListLine( &$list, &$articlelink, &$s, &$rc, $unpatrolled, $watched ) { |
1252 | 1259 | global $wgUser; |
1253 | 1260 | if( $rc->getTitle()->getNamespace() < 0 || !isset($rc->mAttribs['fp_stable']) ) |
1254 | 1261 | return true; // reviewed pages only |