Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -75,7 +75,6 @@ |
76 | 76 | $wgFlaggedRevsNamespaces = array( NS_MAIN, NS_FILE, NS_TEMPLATE ); |
77 | 77 | # Patrollable namespaces (overridden by reviewable namespaces) |
78 | 78 | $wgFlaggedRevsPatrolNamespaces = array(); |
79 | | -#$wgFlaggedRevsPatrolNamespaces = array( NS_CATEGORY, NS_FILE, NS_TEMPLATE ); |
80 | 79 | |
81 | 80 | # Pages exempt from reviewing |
82 | 81 | $wgFlaggedRevsWhitelist = array(); |
— | — | @@ -154,14 +153,6 @@ |
155 | 154 | # Use a literal $wgScriptPath as a placeholder for the runtime value of $wgScriptPath |
156 | 155 | $wgFlaggedRevsStylePath = '$wgScriptPath/extensions/FlaggedRevs'; |
157 | 156 | |
158 | | -# Lets some users access the review UI and set some flags |
159 | | -$wgAvailableRights[] = 'review'; |
160 | | -$wgAvailableRights[] = 'validate'; # Let some users set higher settings |
161 | | -$wgAvailableRights[] = 'autoreview'; |
162 | | -$wgAvailableRights[] = 'patrolmarks'; |
163 | | -$wgAvailableRights[] = 'autopatrolother'; |
164 | | -$wgAvailableRights[] = 'unreviewedpages'; |
165 | | - |
166 | 157 | # Define our basic reviewer class |
167 | 158 | $wgGroupPermissions['editor']['review'] = true; |
168 | 159 | $wgGroupPermissions['editor']['autoreview'] = true; |
— | — | @@ -226,9 +217,6 @@ |
227 | 218 | # How far the logs for overseeing quality revisions and depreciations go |
228 | 219 | $wgFlaggedRevsOversightAge = 7 * 24 * 3600; |
229 | 220 | |
230 | | -# How many pages count as a backlog? |
231 | | -$wgFlaggedRevsBacklog = 2000; |
232 | | - |
233 | 221 | # Flagged revisions are always visible to users with rights below. |
234 | 222 | # Use '*' for non-user accounts. |
235 | 223 | $wgFlaggedRevsVisible = array(); |
— | — | @@ -255,6 +243,15 @@ |
256 | 244 | # End of configuration variables. |
257 | 245 | ######### |
258 | 246 | |
| 247 | +# Lets some users access the review UI and set some flags |
| 248 | +$wgAvailableRights[] = 'review'; |
| 249 | +$wgAvailableRights[] = 'validate'; # Let some users set higher settings |
| 250 | +$wgAvailableRights[] = 'autoreview'; |
| 251 | +$wgAvailableRights[] = 'patrolmarks'; |
| 252 | +$wgAvailableRights[] = 'autopatrolother'; |
| 253 | +$wgAvailableRights[] = 'unreviewedpages'; |
| 254 | +$wgAvailableRights[] = 'movestable'; |
| 255 | + |
259 | 256 | # Bump this number every time you change flaggedrevs.css/flaggedrevs.js |
260 | 257 | $wgFlaggedRevStyleVersion = 53; |
261 | 258 | |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -1398,7 +1398,7 @@ |
1399 | 1399 | } |
1400 | 1400 | |
1401 | 1401 | public static function addBacklogNotice( &$notice ) { |
1402 | | - global $wgUser, $wgTitle, $wgFlaggedRevsBacklog; |
| 1402 | + global $wgUser, $wgTitle, $wgFlaggedRevsNamespaces; |
1403 | 1403 | if( empty($wgTitle) ) { |
1404 | 1404 | return true; // nothing to do here |
1405 | 1405 | } |
— | — | @@ -1406,8 +1406,9 @@ |
1407 | 1407 | $recentchanges = SpecialPage::getTitleFor( 'Recentchanges' ); |
1408 | 1408 | if( $wgUser->isAllowed('review') && ($wgTitle->equals($watchlist) || $wgTitle->equals($recentchanges)) ) { |
1409 | 1409 | $dbr = wfGetDB( DB_SLAVE ); |
| 1410 | + $pages = $dbr->estimateRowCount( 'page', '*', array('page_namespace' => $wgFlaggedRevsNamespaces), __METHOD__ ); |
1410 | 1411 | $unreviewed = $dbr->estimateRowCount( 'flaggedpages', '*', array('fp_reviewed' => 0), __METHOD__ ); |
1411 | | - if( $unreviewed >= $wgFlaggedRevsBacklog ) { |
| 1412 | + if( ($unreviewed/$pages) > .02 ) { |
1412 | 1413 | wfLoadExtensionMessages( 'FlaggedRevs' ); |
1413 | 1414 | $notice .= "<div id='mw-oldreviewed-notice' class='plainlinks fr-backlognotice'>" . |
1414 | 1415 | wfMsgExt('flaggedrevs-backlog',array('parseinline')) . "</div>"; |