r77920 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77919‎ | r77920 | r77921 >
Date:21:58, 6 December 2010
Author:aaron
Status:deferred (Comments)
Tags:
Comment:
Renamed $wgFlaggedRevTags -> $wgFlaggedRevsTags (b/c for old name)
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -98,7 +98,7 @@
9999 # and set the minimum level to have it become a "quality" or "pristine" version.
100100 # NOTE: When setting up new dimensions or levels, you will need to add some
101101 # MediaWiki messages for the UI to show properly; any sysop can do this.
102 -$wgFlaggedRevTags = array(
 102+$wgFlaggedRevsTags = array(
103103 'accuracy' => array( 'levels' => 3, 'quality' => 2, 'pristine' => 4 ),
104104 'depth' => array( 'levels' => 3, 'quality' => 1, 'pristine' => 4 ),
105105 'style' => array( 'levels' => 3, 'quality' => 1, 'pristine' => 4 ),
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -22,18 +22,24 @@
2323 protected static $loaded = false;
2424
2525 public static function load() {
26 - global $wgFlaggedRevTags;
 26+ global $wgFlaggedRevsTags, $wgFlaggedRevTags;
2727 if ( self::$loaded ) {
2828 return true;
2929 }
3030 self::$loaded = true;
 31+ $flaggedRevsTags = null;
 32+ if ( isset( $wgFlaggedRevsTags ) ) {
 33+ $flaggedRevsTags = $wgFlaggedRevsTags;
 34+ } elseif ( isset( $wgFlaggedRevTags ) ) {
 35+ $flaggedRevsTags = $wgFlaggedRevTags; // b/c
 36+ }
3137 # Assume true, then set to false if needed
32 - if ( !empty( $wgFlaggedRevTags ) ) {
 38+ if ( !empty( $flaggedRevsTags ) ) {
3339 self::$qualityVersions = true;
3440 self::$pristineVersions = true;
35 - self::$binaryFlagging = ( count( $wgFlaggedRevTags ) <= 1 );
 41+ self::$binaryFlagging = ( count( $flaggedRevsTags ) <= 1 );
3642 }
37 - foreach ( $wgFlaggedRevTags as $tag => $levels ) {
 43+ foreach ( $flaggedRevsTags as $tag => $levels ) {
3844 # Sanity checks
3945 $safeTag = htmlspecialchars( $tag );
4046 if ( !preg_match( '/^[a-zA-Z]{1,20}$/', $tag ) || $safeTag !== $tag ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r77925* Renamed $wgFlagRestrictions -> $wgFlaggedRevsTagRestrictions...aaron22:32, 6 December 2010

Comments

#Comment by Aaron Schulz (talk | contribs)   22:05, 6 December 2010

Bah, follow-up needed on this.

Status & tagging log