Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -1078,7 +1078,7 @@ |
1079 | 1079 | __METHOD__, |
1080 | 1080 | array( 'ORDER BY' => 'rev_timestamp DESC' ) |
1081 | 1081 | ); |
1082 | | - // Find average, median, deviation... |
| 1082 | + // Find average, median... |
1083 | 1083 | $res = $dbr->select( array( 'revision', 'reader_feedback' ), |
1084 | 1084 | array( 'rfb_ratings' ), |
1085 | 1085 | array( 'rev_page' => $page->getArticleId(), |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -1372,15 +1372,21 @@ |
1373 | 1373 | } |
1374 | 1374 | |
1375 | 1375 | public static function addToRCQuery( &$conds, &$tables, &$join_conds, $opts ) { |
1376 | | - $tables[] = 'flaggedpages'; |
1377 | | - $join_conds['flaggedpages'] = array( 'LEFT JOIN', 'fp_page_id = rc_cur_id' ); |
| 1376 | + global $wgUser; |
| 1377 | + if( $wgUser->isAllowed('review') ) { |
| 1378 | + $tables[] = 'flaggedpages'; |
| 1379 | + $join_conds['flaggedpages'] = array( 'LEFT JOIN', 'fp_page_id = rc_cur_id' ); |
| 1380 | + } |
1378 | 1381 | return true; |
1379 | 1382 | } |
1380 | 1383 | |
1381 | 1384 | public static function addToWatchlistQuery( &$conds, &$tables, &$join_conds, &$fields ) { |
1382 | | - $tables[] = 'flaggedpages'; |
1383 | | - $fields[] = 'fp_stable'; |
1384 | | - $join_conds['flaggedpages'] = array( 'LEFT JOIN', 'fp_page_id = rc_cur_id' ); |
| 1385 | + global $wgUser; |
| 1386 | + if( $wgUser->isAllowed('review') ) { |
| 1387 | + $tables[] = 'flaggedpages'; |
| 1388 | + $fields[] = 'fp_stable'; |
| 1389 | + $join_conds['flaggedpages'] = array( 'LEFT JOIN', 'fp_page_id = rc_cur_id' ); |
| 1390 | + } |
1385 | 1391 | return true; |
1386 | 1392 | } |
1387 | 1393 | |