Revision: 49524 Author: aaron Date: 2009-04-15 20:38:54 +0000 (Wed, 15 Apr 2009)
Log Message: ----------- Added some tag convenience functions Modified Paths: -------------- trunk/extensions/FlaggedRevs/FlaggedRevs.class.php Modified: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php =================================================================== --- trunk/extensions/FlaggedRevs/FlaggedRevs.class.php 2009-04-15 20:18:47 UTC (rev 49523) +++ trunk/extensions/FlaggedRevs/FlaggedRevs.class.php 2009-04-15 20:38:54 UTC (rev 49524) @@ -323,6 +323,22 @@ } return $flags; } + + /** + * Get minimum level tags for a tier + * @return array + */ + public static function quickTags( $tier ) { + switch( $tier ) + { + case 2: + return self::quickPristineTags(); + case 1: + return self::quickQualityTags(); + default: + return self::quickSightedTags(); + } + } /** * Get minimum tags that are closest to the quality level @@ -1045,6 +1061,19 @@ } /** + * @param Array $flags + * @return int, flagging tier + */ + public static function getLevelTier( $flags ) { + if( self::isPristine($flags ) ) + return 2; + else if( self::isQuality($flags ) ) + return 1; + else + return 0; + } + + /** * Is this page in reviewable namespace? * @param Title, $title * @return bool _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs