Explorar o código

Simplified case statement. Suggestion from Thijs.

tokul %!s(int64=22) %!d(string=hai) anos
pai
achega
efd2c4d9b8
Modificáronse 1 ficheiros con 2 adicións e 6 borrados
  1. 2 6
      functions/i18n.php

+ 2 - 6
functions/i18n.php

@@ -721,20 +721,16 @@ function cleanup_nbsp($string,$charset) {
 // where is non-braking space symbol
 switch($output_charset):
  case "iso-8859-x":
+ case "cp125x":
+ case "iso-2022-jp":
   $nbsp="\xA0";
   break;
- case "cp125x":
-   $nbsp="\xA0";
-   break;
  case "koi8-x":
    $nbsp="\x9A";
    break;
  case "utf-8":
    $nbsp="\xC2\xA0";
    break;
- case "iso-2022-jp":
-   $nbsp="\xA0";
-   break;
  default:
    // don't change string if charset is unmatched
    return $string;