r89052 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89051‎ | r89052 | r89053 >
Date:18:05, 28 May 2011
Author:raymond
Status:ok
Tags:
Comment:
Followup r89020: Run numbers in this function through $wgLang->formatNum()
Modified paths:
  • /trunk/extensions/SecurePoll/includes/entities/Election.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SecurePoll/includes/entities/Election.php
@@ -159,6 +159,7 @@
160160 * @return Status
161161 */
162162 function getQualifiedStatus( $params ) {
 163+ global $wgLang;
163164 $props = $params['properties'];
164165 $status = Status::newGood();
165166
@@ -166,14 +167,13 @@
167168 $minEdits = $this->getProperty( 'min-edits' );
168169 $edits = isset( $props['edit-count'] ) ? $props['edit-count'] : 0;
169170 if ( $minEdits && $edits < $minEdits ) {
170 - $status->fatal( 'securepoll-too-few-edits', $minEdits, $edits );
 171+ $status->fatal( 'securepoll-too-few-edits', $wgLang->formatNum( $minEdits), $wgLang->formatNum( $edits ) );
171172 }
172173
173174 # Registration date
174175 $maxDate = $this->getProperty( 'max-registration' );
175176 $date = isset( $props['registration'] ) ? $props['registration'] : 0;
176177 if ( $maxDate && $date > $maxDate ) {
177 - global $wgLang;
178178 $status->fatal(
179179 'securepoll-too-new',
180180 $wgLang->timeanddate( $maxDate ),
@@ -193,7 +193,7 @@
194194 $centralBlockCount = isset( $props['central-block-count'] ) ? $props['central-block-count'] : 0;
195195 $centralBlockThreshold = $this->getProperty( 'central-block-threshold', 1 );
196196 if ( $centralBlockCount >= $centralBlockThreshold ) {
197 - $status->fatal( 'securepoll-blocked-centrally', $centralBlockThreshold );
 197+ $status->fatal( 'securepoll-blocked-centrally', $wgLang->formatNum( $centralBlockThreshold ) );
198198 }
199199
200200 # Bot

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89020Add support for detecting number of wikis a user is blocked on, and preventin...werdna07:23, 28 May 2011

Status & tagging log