Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -323,6 +323,22 @@ |
324 | 324 | } |
325 | 325 | return $flags; |
326 | 326 | } |
| 327 | + |
| 328 | + /** |
| 329 | + * Get minimum level tags for a tier |
| 330 | + * @return array |
| 331 | + */ |
| 332 | + public static function quickTags( $tier ) { |
| 333 | + switch( $tier ) |
| 334 | + { |
| 335 | + case 2: |
| 336 | + return self::quickPristineTags(); |
| 337 | + case 1: |
| 338 | + return self::quickQualityTags(); |
| 339 | + default: |
| 340 | + return self::quickSightedTags(); |
| 341 | + } |
| 342 | + } |
327 | 343 | |
328 | 344 | /** |
329 | 345 | * Get minimum tags that are closest to the quality level |
— | — | @@ -1045,6 +1061,19 @@ |
1046 | 1062 | } |
1047 | 1063 | |
1048 | 1064 | /** |
| 1065 | + * @param Array $flags |
| 1066 | + * @return int, flagging tier |
| 1067 | + */ |
| 1068 | + public static function getLevelTier( $flags ) { |
| 1069 | + if( self::isPristine($flags ) ) |
| 1070 | + return 2; |
| 1071 | + else if( self::isQuality($flags ) ) |
| 1072 | + return 1; |
| 1073 | + else |
| 1074 | + return 0; |
| 1075 | + } |
| 1076 | + |
| 1077 | + /** |
1049 | 1078 | * Is this page in reviewable namespace? |
1050 | 1079 | * @param Title, $title |
1051 | 1080 | * @return bool |