Revert "bug-1280: Variable naming, formatting, php-syntax-error"
authorMichael Tänzer <neo@nhng.de>
Sat, 21 Jun 2014 15:37:44 +0000 (17:37 +0200)
committerMichael Tänzer <neo@nhng.de>
Sat, 21 Jun 2014 15:37:44 +0000 (17:37 +0200)
This reverts commit 6b1cd2a57b0aaa88374b1098df40cc6f73cdff5d.

pages/wot/9.php

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