From: Nik Okuntseff Date: Thu, 24 Mar 2016 01:48:14 +0000 (-0700) Subject: Refactoring white space X-Git-Tag: timetracker_1.19-1~1786 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=91e951c88f39495bad54d1e06eb138b65c53c6d8;p=timetracker.git Refactoring white space --- diff --git a/WEB-INF/lib/I18n.class.php b/WEB-INF/lib/I18n.class.php index f4b8b07e..f21c0a01 100644 --- a/WEB-INF/lib/I18n.class.php +++ b/WEB-INF/lib/I18n.class.php @@ -68,25 +68,24 @@ class I18n { $this->monthNames = $i18n_months; $this->weekdayNames = $i18n_weekdays; - + $this->weekdayShortNames = $i18n_weekdays_short; if (defined('SHOW_HOLIDAYS') && isTrue(SHOW_HOLIDAYS)) { $this->holidays = $i18n_holidays; } - + foreach ($i18n_key_words as $kword=>$value) { - $pos = strpos($kword, "."); - if (!($pos === false)) { - $p = explode(".", $kword); - $str = ""; - foreach ($p as $w) { - $str .= "[\"".$w."\"]"; - } - //$value = addslashes($value); - eval("\$this->keys".$str."='".$value."';"); - } else { - $this->keys[$kword] = $value; - } + $pos = strpos($kword, "."); + if (!($pos === false)) { + $p = explode(".", $kword); + $str = ""; + foreach ($p as $w) { + $str .= "[\"".$w."\"]"; + } + eval("\$this->keys".$str."='".$value."';"); + } else { + $this->keys[$kword] = $value; + } } } @@ -102,21 +101,20 @@ class I18n { $this->holidays = $i18n_holidays; } foreach ($i18n_key_words as $kword=>$value) { - if (!$value) continue; - $pos = strpos($kword, "."); - if (!($pos === false)) { - $p = explode(".", $kword); - $str = ""; - foreach ($p as $w) { - $str .= "[\"".$w."\"]"; - } - //$value = addslashes($value); - eval("\$this->keys".$str."='".$value."';"); - } else { - $this->keys[$kword] = $value; - } + if (!$value) continue; + $pos = strpos($kword, "."); + if (!($pos === false)) { + $p = explode(".", $kword); + $str = ""; + foreach ($p as $w) { + $str .= "[\"".$w."\"]"; + } + eval("\$this->keys".$str."='".$value."';"); + } else { + $this->keys[$kword] = $value; + } } - return true; + return true; } } @@ -150,15 +148,15 @@ class I18n { $d = @opendir(RESOURCE_DIR); while (($file = @readdir($d))) { if (($file != ".") && ($file != "..")) { - if (strpos($file, ".lang.php")) { - $fileList[] = @basename($file); - } + if (strpos($file, ".lang.php")) { + $fileList[] = @basename($file); + } } } @closedir($d); return $fileList; } - + static function getLangFromFilename($filename) { return substr($filename, 0, strpos($filename, '.')); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 8465c79e..c2ed75bd 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.9.17.3437 | Copyright © Anuko | +  Anuko Time Tracker 1.9.17.3438 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve}