From a953fbf770a1378dddbd991dd687fd89e40b70a5 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 19 Oct 2016 14:51:03 +0200 Subject: fix phan warnings --- it_text.class | 9 +++++---- 1 file 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) -- cgit v1.2.3