r9917 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r9916‎ | r9917 | r9918 >
Date:05:18, 5 July 2005
Author:kateturner
Status:old
Tags:
Comment:
bug 1651: ipboptions should be translatable
Modified paths:
  • /trunk/phase3/includes/SpecialBlockip.php (modified) (history)
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialBlockip.php
@@ -83,10 +83,13 @@
8484
8585 $blockExpiryFormOptions = "<option value=\"other\">$mIpbothertime</option>";
8686 foreach (explode(',', $scBlockExpiryOptions) as $option) {
 87+ list($show, $value) = explode(":", $option);
 88+ $show = htmlspecialchars($show);
 89+ $value = htmlspecialchars($value);
8790 $selected = "";
88 - if ($this->BlockExpiry === $option)
 91+ if ($this->BlockExpiry === $value)
8992 $selected = ' selected="selected"';
90 - $blockExpiryFormOptions .= "<option$selected>$option</option>";
 93+ $blockExpiryFormOptions .= "<option value=\"$value\"$selected>$show</option>";
9194 }
9295
9396 $token = htmlspecialchars( $wgUser->editToken() );
Index: trunk/phase3/languages/Language.php
@@ -1405,7 +1405,7 @@
14061406 'ipbreason' => 'Reason',
14071407 'ipbsubmit' => 'Block this user',
14081408 'ipbother' => 'Other time',
1409 -'ipboptions' => '2 hours,1 day,3 days,1 week,2 weeks,1 month,3 months,6 months,1 year,infinite',
 1409+'ipboptions' => '2 hours:2 hours,1 day:1 day,3 days:3 days,1 week:1 week,2 weeks:2 weeks,1 month:1 month,3 months:3 months,6 months:6 months,1 year:1 year,infinite:infinite',
14101410 'ipbotheroption' => 'other',
14111411 'badipaddress' => 'Invalid IP address',
14121412 'blockipsuccesssub' => 'Block succeeded',

Status & tagging log