bug 1651: ipboptions should be translatable
authorRiver Tarnell <kateturner@users.mediawiki.org>
Tue, 5 Jul 2005 05:18:17 +0000 (05:18 +0000)
committerRiver Tarnell <kateturner@users.mediawiki.org>
Tue, 5 Jul 2005 05:18:17 +0000 (05:18 +0000)
includes/SpecialBlockip.php
languages/Language.php

index 4d60cdc..98a4af2 100644 (file)
@@ -83,10 +83,13 @@ class IPBlockForm {
 
                $blockExpiryFormOptions = "<option value=\"other\">$mIpbothertime</option>";
                foreach (explode(',', $scBlockExpiryOptions) as $option) {
+                       list($show, $value) = explode(":", $option);
+                       $show = htmlspecialchars($show);
+                       $value = htmlspecialchars($value);
                        $selected = "";
-                       if ($this->BlockExpiry === $option)
+                       if ($this->BlockExpiry === $value)
                                $selected = ' selected="selected"';
-                       $blockExpiryFormOptions .= "<option$selected>$option</option>";
+                       $blockExpiryFormOptions .= "<option value=\"$value\"$selected>$show</option>";
                }
 
                $token = htmlspecialchars( $wgUser->editToken() );
index 5e0890d..888f61c 100644 (file)
@@ -1405,7 +1405,7 @@ pages that were vandalized).",
 'ipbreason'            => 'Reason',
 'ipbsubmit'            => 'Block this user',
 'ipbother'             => 'Other time',
-'ipboptions'           => '2 hours,1 day,3 days,1 week,2 weeks,1 month,3 months,6 months,1 year,infinite',
+'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',
 'ipbotheroption'       => 'other',
 'badipaddress' => 'Invalid IP address',
 'blockipsuccesssub' => 'Block succeeded',