Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -1187,7 +1187,7 @@ |
1188 | 1188 | $minLevels = self::$minSL; |
1189 | 1189 | } |
1190 | 1190 | $flags = array(); |
1191 | | - foreach ( self::getDimensions() as $tag => $x ) { |
| 1191 | + foreach ( self::getTags() as $tag ) { |
1192 | 1192 | $flags[$tag] = $minLevels[$tag]; |
1193 | 1193 | } |
1194 | 1194 | return $flags; |
— | — | @@ -1205,7 +1205,7 @@ |
1206 | 1206 | return null; // shouldn't happen |
1207 | 1207 | } |
1208 | 1208 | $flags = array(); |
1209 | | - foreach ( self::getDimensions() as $tag => $levels ) { |
| 1209 | + foreach ( self::getTags() as $tag ) { |
1210 | 1210 | # Try to keep this tag val the same as the stable rev's |
1211 | 1211 | $val = isset( $oldFlags[$tag] ) ? $oldFlags[$tag] : 1; |
1212 | 1212 | $val = min( $val, self::maxAutoReviewLevel( $tag ) ); |
Index: trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php |
— | — | @@ -217,7 +217,7 @@ |
218 | 218 | if ( $iDims ) { |
219 | 219 | $this->dims = $iDims; |
220 | 220 | } else { |
221 | | - foreach ( FlaggedRevs::getDimensions() as $tag ) { |
| 221 | + foreach ( FlaggedRevs::getTags() as $tag ) { |
222 | 222 | if ( $this->dims[$tag] === 0 ) { |
223 | 223 | $this->unapprovedTags++; |
224 | 224 | } |
— | — | @@ -226,7 +226,7 @@ |
227 | 227 | # We must at least rate each category as 1, the minimum |
228 | 228 | # Exception: we can rate ALL as unapproved to depreciate a revision |
229 | 229 | if ( $this->unapprovedTags |
230 | | - && $this->unapprovedTags < count( FlaggedRevs::getDimensions() ) ) |
| 230 | + && $this->unapprovedTags < count( FlaggedRevs::getTags() ) ) |
231 | 231 | { |
232 | 232 | return 'review_too_low'; |
233 | 233 | } |
— | — | @@ -748,7 +748,7 @@ |
749 | 749 | $form .= Xml::openElement( 'span', array( 'style' => 'white-space: nowrap;' ) ); |
750 | 750 | # Hide comment input if needed |
751 | 751 | if ( !$disabled ) { |
752 | | - if ( count( FlaggedRevs::getDimensions() ) > 1 ) { |
| 752 | + if ( count( FlaggedRevs::getTags() ) > 1 ) { |
753 | 753 | $form .= "<br />"; // Don't put too much on one line |
754 | 754 | } |
755 | 755 | $form .= "<span id='mw-fr-commentbox' style='clear:both'>" . |
— | — | @@ -809,7 +809,6 @@ |
810 | 810 | if ( $labels === false ) { |
811 | 811 | $disabled = true; // a tag is unsettable |
812 | 812 | } |
813 | | - $dimensions = FlaggedRevs::getDimensions(); |
814 | 813 | # If there are no tags, make one checkbox to approve/unapprove |
815 | 814 | if ( FlaggedRevs::binaryFlagging() ) { |
816 | 815 | return ''; |
— | — | @@ -818,7 +817,7 @@ |
819 | 818 | # Build rating form... |
820 | 819 | if ( $disabled ) { |
821 | 820 | // Display the value for each tag as text |
822 | | - foreach ( $dimensions as $quality => $levels ) { |
| 821 | + foreach ( FlaggedRevs::getTags() as $quality ) { |
823 | 822 | $selected = isset( $flags[$quality] ) ? $flags[$quality] : 0; |
824 | 823 | $items[] = FlaggedRevs::getTagMsg( $quality ) . ": " . |
825 | 824 | FlaggedRevs::getTagValueMsg( $quality, $selected ); |
Index: trunk/extensions/FlaggedRevs/FlaggedRevision.php |
— | — | @@ -741,7 +741,7 @@ |
742 | 742 | public static function expandRevisionTags( $tags ) { |
743 | 743 | # Set all flags to zero |
744 | 744 | $flags = array(); |
745 | | - foreach ( FlaggedRevs::getDimensions() as $tag => $levels ) { |
| 745 | + foreach ( FlaggedRevs::getTags() as $tag ) { |
746 | 746 | $flags[$tag] = 0; |
747 | 747 | } |
748 | 748 | $tags = str_replace( '\n', "\n", $tags ); // B/C, old broken rows |
Index: trunk/extensions/FlaggedRevs/specialpages/RevisionReview_body.php |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | # Special token to discourage fiddling... |
59 | 59 | $form->setValidatedParams( $wgRequest->getVal( 'validatedParams' ) ); |
60 | 60 | # Tag values |
61 | | - foreach ( FlaggedRevs::getDimensions() as $tag ) { |
| 61 | + foreach ( FlaggedRevs::getTags() as $tag ) { |
62 | 62 | # This can be NULL if we uncheck a checkbox |
63 | 63 | $val = $wgRequest->getInt( "wp$tag" ); |
64 | 64 | $form->setDim( $tag, $val ); |
— | — | @@ -136,7 +136,7 @@ |
137 | 137 | if ( wfReadOnly() ) { |
138 | 138 | return '<err#>' . wfMsgExt( 'revreview-failed', 'parseinline' ); |
139 | 139 | } |
140 | | - $tags = FlaggedRevs::getDimensions(); |
| 140 | + $tags = FlaggedRevs::getTags(); |
141 | 141 | // Make review interface object |
142 | 142 | $form = new RevisionReviewForm( $wgUser ); |
143 | 143 | $title = null; // target page |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsXML.php |
— | — | @@ -182,7 +182,7 @@ |
183 | 183 | if ( $prettyBox ) { |
184 | 184 | $tag .= "<table id='mw-fr-revisionratings-box' align='center' class='$css' cellpadding='0'>"; |
185 | 185 | } |
186 | | - foreach ( FlaggedRevs::getDimensions() as $quality ) { |
| 186 | + foreach ( FlaggedRevs::getTags() as $quality ) { |
187 | 187 | $level = isset( $flags[$quality] ) ? $flags[$quality] : 0; |
188 | 188 | $encValueText = wfMsgHtml( "revreview-$quality-$level" ); |
189 | 189 | $level = $flags[$quality]; |
Index: trunk/extensions/FlaggedRevs/api/ApiReview.php |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | $form->setNotes( $params['notes'] ); |
64 | 64 | // The flagging parameters have the form 'flag_$name'. |
65 | 65 | // Extract them and put the values into $form->dims |
66 | | - foreach ( FlaggedRevs::getDimensions() as $tag ) { |
| 66 | + foreach ( FlaggedRevs::getTags() as $tag ) { |
67 | 67 | $form->setDim( $tag, intval( $params['flag_' . $tag] ) ); |
68 | 68 | } |
69 | 69 | if ( $form->isApproval() ) { |
— | — | @@ -174,7 +174,7 @@ |
175 | 175 | if ( FlaggedRevs::dimensionsEmpty() ) { |
176 | 176 | $desc['unapprove'] = "If set, revision will be unapproved rather than approved."; |
177 | 177 | } else { |
178 | | - foreach ( FlaggedRevs::getDimensions() as $flagname ) { |
| 178 | + foreach ( FlaggedRevs::getTags() as $flagname ) { |
179 | 179 | $desc['flag_' . $flagname] = "Set the flag ''{$flagname}'' to the specified value"; |
180 | 180 | } |
181 | 181 | } |