Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -98,7 +98,7 @@ |
99 | 99 | # and set the minimum level to have it become a "quality" or "pristine" version. |
100 | 100 | # NOTE: When setting up new dimensions or levels, you will need to add some |
101 | 101 | # MediaWiki messages for the UI to show properly; any sysop can do this. |
102 | | -$wgFlaggedRevTags = array( |
| 102 | +$wgFlaggedRevsTags = array( |
103 | 103 | 'accuracy' => array( 'levels' => 3, 'quality' => 2, 'pristine' => 4 ), |
104 | 104 | 'depth' => array( 'levels' => 3, 'quality' => 1, 'pristine' => 4 ), |
105 | 105 | 'style' => array( 'levels' => 3, 'quality' => 1, 'pristine' => 4 ), |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -22,18 +22,24 @@ |
23 | 23 | protected static $loaded = false; |
24 | 24 | |
25 | 25 | public static function load() { |
26 | | - global $wgFlaggedRevTags; |
| 26 | + global $wgFlaggedRevsTags, $wgFlaggedRevTags; |
27 | 27 | if ( self::$loaded ) { |
28 | 28 | return true; |
29 | 29 | } |
30 | 30 | self::$loaded = true; |
| 31 | + $flaggedRevsTags = null; |
| 32 | + if ( isset( $wgFlaggedRevsTags ) ) { |
| 33 | + $flaggedRevsTags = $wgFlaggedRevsTags; |
| 34 | + } elseif ( isset( $wgFlaggedRevTags ) ) { |
| 35 | + $flaggedRevsTags = $wgFlaggedRevTags; // b/c |
| 36 | + } |
31 | 37 | # Assume true, then set to false if needed |
32 | | - if ( !empty( $wgFlaggedRevTags ) ) { |
| 38 | + if ( !empty( $flaggedRevsTags ) ) { |
33 | 39 | self::$qualityVersions = true; |
34 | 40 | self::$pristineVersions = true; |
35 | | - self::$binaryFlagging = ( count( $wgFlaggedRevTags ) <= 1 ); |
| 41 | + self::$binaryFlagging = ( count( $flaggedRevsTags ) <= 1 ); |
36 | 42 | } |
37 | | - foreach ( $wgFlaggedRevTags as $tag => $levels ) { |
| 43 | + foreach ( $flaggedRevsTags as $tag => $levels ) { |
38 | 44 | # Sanity checks |
39 | 45 | $safeTag = htmlspecialchars( $tag ); |
40 | 46 | if ( !preg_match( '/^[a-zA-Z]{1,20}$/', $tag ) || $safeTag !== $tag ) { |