diff options
author | Urban Müller | 2016-10-19 14:51:03 +0200 |
---|---|---|
committer | Urban Müller | 2016-10-19 14:51:03 +0200 |
commit | a953fbf770a1378dddbd991dd687fd89e40b70a5 (patch) | |
tree | e8a424994dc5c6f926002d15a5f0a99d2c4c5da1 | |
parent | edc1481438baf32e26fe7331cc752a7ea51576cb (diff) | |
download | itools-a953fbf770a1378dddbd991dd687fd89e40b70a5.tar.gz itools-a953fbf770a1378dddbd991dd687fd89e40b70a5.tar.bz2 itools-a953fbf770a1378dddbd991dd687fd89e40b70a5.zip |
fix phan warnings
-rw-r--r-- | it_text.class | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/it_text.class b/it_text.class index df3509d..830dfe2 100644 --- a/it_text.class +++ b/it_text.class @@ -25,6 +25,7 @@ class it_text var $languages_available = array(); # Available languages var $statictext = array(); # Text array, read from php file on init var $label_to_service = array(); # which label belongs to which service - only used for debug parameter texts + var $p; # Constructor Parameters /** * Constructor @@ -77,7 +78,7 @@ function it_text($p = array()) { $this->languages[$code] = $languagename; if (!$this->actlanguage) - $this->initlang($code, "setting failsafe language"); + $this->initlang($code); # failsafe lang } } @@ -85,13 +86,13 @@ function it_text($p = array()) if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { foreach (explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']) as $code) - if ($this->initlang($code, "setting language from browser") || $this->initlang(substr($code, 0, 2), "setting language family from browser")) + if ($this->initlang($code) || $this->initlang(substr($code, 0, 2))) # lang from browser/lang group from browser break; } $this->defaultlanguage = $this->actlanguage; - $this->initlang(it::match('\.([a-z]{2})\.[^./]+$', $_SERVER['PHP_SELF']), "setting language from url override"); - $this->initlang($p['forcelanguage'], "setting language from programmer override"); + $this->initlang(it::match('\.([a-z]{2})\.[^./]+$', $_SERVER['PHP_SELF'])); # lang from url override + $this->initlang($p['forcelanguage']); # programmer override # Create empty array to activate sampling; dont kill any existing one if (!it::is_live() || rand(1, $_POST ? 10 : 100) == 1) |