Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -116,10 +116,8 @@ |
117 | 117 | # Let this stand alone just in case... |
118 | 118 | $wgGroupPermissions['reviewer']['review'] = true; |
119 | 119 | |
120 | | -# Define when users get automatically promoted |
121 | | -$wgFlaggedRevsAutopromote = array('editor' => array('days' => 60, |
122 | | - 'edits' => 1000, |
123 | | - 'email' => true) ); |
| 120 | +# Define when users get automatically promoted to editors |
| 121 | +$wgFlaggedRevsAutopromote = array('days' => 60, 'edits' => 1000, 'email' => true); |
124 | 122 | |
125 | 123 | # What icons to display |
126 | 124 | |
— | — | @@ -526,25 +524,24 @@ |
527 | 525 | // Do not give this to bots |
528 | 526 | if ( in_array( 'bot', $groups ) ) return; |
529 | 527 | // Check if we need to promote... |
530 | | - foreach ($wgFlaggedRevsAutopromote as $group=>$vars) { |
531 | | - if ( !in_array($group,$groups) && $userage >= $vars['days'] && $user->getEditCount() >= $vars['edits'] |
532 | | - && ( !$vars['email'] || $wgUser->isAllowed('emailconfirmed') ) ) { |
533 | | - # Do not re-add status if it was previously removed... |
534 | | - $fname = 'FlaggedRevs::autoPromoteUser'; |
535 | | - $db = wfGetDB( DB_SLAVE ); |
536 | | - $result = $db->select( |
537 | | - array('logging'), |
538 | | - array('log_user'), |
539 | | - array("log_type='validate'", "log_action='revoke1'", 'log_namespace' => NS_USER, 'log_title' => $user->getName() ), |
540 | | - $fname, |
541 | | - 'LIMIT = 1'); |
542 | | - # Add rights if they were never removed |
543 | | - if ( !$db->numRows($result) ) { |
544 | | - $user->addGroup($group); |
545 | | - # Lets NOT spam RC, set $RC to false |
546 | | - $log = new LogPage( 'validate', false ); |
547 | | - $log->addEntry('grant1', $user->getUserPage(), wfMsgHtml('makevalidate-autosum') ); |
548 | | - } |
| 528 | + $vars = $wgFlaggedRevsAutopromote; |
| 529 | + if ( !in_array('editor',$groups) && $userage >= $vars['days'] && $user->getEditCount() >= $vars['edits'] |
| 530 | + && ( !$vars['email'] || $wgUser->isAllowed('emailconfirmed') ) ) { |
| 531 | + # Do not re-add status if it was previously removed... |
| 532 | + $fname = 'FlaggedRevs::autoPromoteUser'; |
| 533 | + $db = wfGetDB( DB_SLAVE ); |
| 534 | + $result = $db->select( |
| 535 | + array('logging'), |
| 536 | + array('log_user'), |
| 537 | + array("log_type='validate'", "log_action='revoke1'", 'log_namespace' => NS_USER, 'log_title' => $user->getName() ), |
| 538 | + $fname, |
| 539 | + array('LIMIT' => 1) ); |
| 540 | + # Add rights if they were never removed |
| 541 | + if ( !$db->numRows($result) ) { |
| 542 | + $user->addGroup('editor'); |
| 543 | + # Lets NOT spam RC, set $RC to false |
| 544 | + $log = new LogPage( 'validate', false ); |
| 545 | + $log->addEntry('grant1', $user->getUserPage(), wfMsgHtml('makevalidate-autosum') ); |
549 | 546 | } |
550 | 547 | } |
551 | 548 | } |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.body.php |
— | — | @@ -253,10 +253,10 @@ |
254 | 254 | $fulltext = FlaggedRevs::expandText( $rev->getText(), $rev->getTitle() ); |
255 | 255 | |
256 | 256 | $quality = 0; |
257 | | - if ( FlaggedRevs::isPristine($this->dims) ) |
258 | | - $quality = 2; |
259 | | - else if ( FlaggedRevs::isQuality($this->dims) ) |
260 | | - $quality = 1; |
| 257 | + if ( FlaggedRevs::isQuality($this->dims) ) { |
| 258 | + $quality = FlaggedRevs::getLCQuality($this->dims); |
| 259 | + $quality = ($quality > 1) ? $quality : 1; |
| 260 | + } |
261 | 261 | |
262 | 262 | $dbw = wfGetDB( DB_MASTER ); |
263 | 263 | // Our review entry |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.i18n.php |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | 'revreview-accuracy-4' => 'Featured', |
69 | 69 | 'revreview-depth' => 'Depth', |
70 | 70 | 'revreview-depth-0' => 'Unapproved', |
71 | | - 'revreview-depth-1' => 'Stub', |
| 71 | + 'revreview-depth-1' => 'Basic', |
72 | 72 | 'revreview-depth-2' => 'Moderate', |
73 | 73 | 'revreview-depth-3' => 'High', |
74 | 74 | 'revreview-depth-4' => 'Featured', |