r25343 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25342‎ | r25343 | r25344 >
Date:09:48, 31 August 2007
Author:aaron
Status:old
Tags:
Comment:
*Remove getLCQuality() and incosistent number rating. Just use 0,1,2.
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevsPage_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -573,20 +573,6 @@
574574 }
575575 return true;
576576 }
577 -
578 - /**
579 - * @param Array $flags
580 - * @returns integer, lowest rating level
581 - */
582 - public static function getLCQuality( $flags ) {
583 - global $wgFlaggedRevValues;
584 -
585 - $min = false;
586 - foreach( $flags as $f => $v ) {
587 - if( $min==false || $v < $min ) $min = $v;
588 - }
589 - return $min;
590 - }
591577
592578 /**
593579 * Is this page in reviewable namespace?
@@ -1028,8 +1014,7 @@
10291015
10301016 $quality = 0;
10311017 if( FlaggedRevs::isQuality($flags) ) {
1032 - $quality = FlaggedRevs::getLCQuality($flags);
1033 - $quality = ($quality > 1) ? $quality : 1;
 1018+ $quality = FlaggedRevs::isPristine($flags) ? 2 : 1;
10341019 }
10351020 $flagset = $tmpset = $imgset = array();
10361021 foreach( $flags as $tag => $value ) {
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage_body.php
@@ -286,9 +286,8 @@
287287 $title = $rev->getTitle();
288288
289289 $quality = 0;
290 - if( FlaggedRevs::isQuality($this->dims) ) {
291 - $quality = FlaggedRevs::getLCQuality($this->dims);
292 - $quality = ($quality > 1) ? $quality : 1;
 290+ if( FlaggedRevs::isQuality($flags) ) {
 291+ $quality = FlaggedRevs::isPristine($flags) ? 2 : 1;
293292 }
294293 // Our flags
295294 $flagset = array();

Status & tagging log