bug-1280: Variable naming, formatting, php-syntax-error
authorFelix Dörre <felix@dogcraft.de>
Wed, 11 Jun 2014 17:49:42 +0000 (19:49 +0200)
committerFelix Dörre <felix@dogcraft.de>
Wed, 11 Jun 2014 17:49:42 +0000 (19:49 +0200)
pages/wot/9.php

index d04c4fa..4bb5504 100644 (file)
   <tr>
     <td class="DataTD"><?=_("Language")?>:</td>
     <?
-       $parts = explode("_", $userlang ,2);
-       if(count($parts == 2)){
-               $printlang = array_search( strtolower($parts[0])."_".strtoupper($parts[1]), L10n::$locales);
+       $userlang = explode("_", $userlang, 2);
+       if(count($userlang) == 2){
+               $printlang = array_search(strtolower($userlang[0]) . "_" . strtoupper($userlang[1]), L10n::$locales);
                if($printlang === false){
-                       $printlang = $parts[0];
+                       $printlang = $userlang[0];
                }
        }else{
-               $printlang = strtolower($parts[0]);
+               $printlang = strtolower($userlang[0]);
        }
     ?>
     <td class="DataTD" align="left"><? printf(_("%s prefers to be contacted in %s"), sanitizeHTML($user['fname']), L10n::$translations[$printlang]) ?></td>