r46890 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46889‎ | r46890 | r46891 >
Date:04:36, 6 February 2009
Author:aaron
Status:deferred
Tags:
Comment:
* Removed $wgFlaggedRevsBacklog
* Minor permission cleanup
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
@@ -75,7 +75,6 @@
7676 $wgFlaggedRevsNamespaces = array( NS_MAIN, NS_FILE, NS_TEMPLATE );
7777 # Patrollable namespaces (overridden by reviewable namespaces)
7878 $wgFlaggedRevsPatrolNamespaces = array();
79 -#$wgFlaggedRevsPatrolNamespaces = array( NS_CATEGORY, NS_FILE, NS_TEMPLATE );
8079
8180 # Pages exempt from reviewing
8281 $wgFlaggedRevsWhitelist = array();
@@ -154,14 +153,6 @@
155154 # Use a literal $wgScriptPath as a placeholder for the runtime value of $wgScriptPath
156155 $wgFlaggedRevsStylePath = '$wgScriptPath/extensions/FlaggedRevs';
157156
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 -
166157 # Define our basic reviewer class
167158 $wgGroupPermissions['editor']['review'] = true;
168159 $wgGroupPermissions['editor']['autoreview'] = true;
@@ -226,9 +217,6 @@
227218 # How far the logs for overseeing quality revisions and depreciations go
228219 $wgFlaggedRevsOversightAge = 7 * 24 * 3600;
229220
230 -# How many pages count as a backlog?
231 -$wgFlaggedRevsBacklog = 2000;
232 -
233221 # Flagged revisions are always visible to users with rights below.
234222 # Use '*' for non-user accounts.
235223 $wgFlaggedRevsVisible = array();
@@ -255,6 +243,15 @@
256244 # End of configuration variables.
257245 #########
258246
 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+
259256 # Bump this number every time you change flaggedrevs.css/flaggedrevs.js
260257 $wgFlaggedRevStyleVersion = 53;
261258
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -1398,7 +1398,7 @@
13991399 }
14001400
14011401 public static function addBacklogNotice( &$notice ) {
1402 - global $wgUser, $wgTitle, $wgFlaggedRevsBacklog;
 1402+ global $wgUser, $wgTitle, $wgFlaggedRevsNamespaces;
14031403 if( empty($wgTitle) ) {
14041404 return true; // nothing to do here
14051405 }
@@ -1406,8 +1406,9 @@
14071407 $recentchanges = SpecialPage::getTitleFor( 'Recentchanges' );
14081408 if( $wgUser->isAllowed('review') && ($wgTitle->equals($watchlist) || $wgTitle->equals($recentchanges)) ) {
14091409 $dbr = wfGetDB( DB_SLAVE );
 1410+ $pages = $dbr->estimateRowCount( 'page', '*', array('page_namespace' => $wgFlaggedRevsNamespaces), __METHOD__ );
14101411 $unreviewed = $dbr->estimateRowCount( 'flaggedpages', '*', array('fp_reviewed' => 0), __METHOD__ );
1411 - if( $unreviewed >= $wgFlaggedRevsBacklog ) {
 1412+ if( ($unreviewed/$pages) > .02 ) {
14121413 wfLoadExtensionMessages( 'FlaggedRevs' );
14131414 $notice .= "<div id='mw-oldreviewed-notice' class='plainlinks fr-backlognotice'>" .
14141415 wfMsgExt('flaggedrevs-backlog',array('parseinline')) . "</div>";

Status & tagging log