r45002 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45001‎ | r45002 | r45003 >
Date:15:05, 24 December 2008
Author:nikerabbit
Status:ok
Tags:
Comment:
* No need to use is_null here
Modified paths:
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/Language.php
@@ -1899,12 +1899,12 @@
19001900 if (!$nocommafy) {
19011901 $number = $this->commafy($number);
19021902 $s = $this->separatorTransformTable();
1903 - if (!is_null($s)) { $number = strtr($number, $s); }
 1903+ if ($s) { $number = strtr($number, $s); }
19041904 }
19051905
19061906 if ($wgTranslateNumerals) {
19071907 $s = $this->digitTransformTable();
1908 - if (!is_null($s)) { $number = strtr($number, $s); }
 1908+ if ($s) { $number = strtr($number, $s); }
19091909 }
19101910
19111911 return $number;
@@ -1912,10 +1912,10 @@
19131913
19141914 function parseFormattedNumber( $number ) {
19151915 $s = $this->digitTransformTable();
1916 - if (!is_null($s)) { $number = strtr($number, array_flip($s)); }
 1916+ if ($s) { $number = strtr($number, array_flip($s)); }
19171917
19181918 $s = $this->separatorTransformTable();
1919 - if (!is_null($s)) { $number = strtr($number, array_flip($s)); }
 1919+ if ($s) { $number = strtr($number, array_flip($s)); }
19201920
19211921 $number = strtr( $number, array (',' => '') );
19221922 return $number;

Status & tagging log