From 7ee56cc6e8ea89c030b3eb5f8d4d4f8c1d5a053d Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Tue, 5 Jan 2021 15:45:56 +0100 Subject: Remove obsolete support for texts.php without return statement, we do not have such files anymore --- it_text.class | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/it_text.class b/it_text.class index dbfda47..f575344 100644 --- a/it_text.class +++ b/it_text.class @@ -57,18 +57,13 @@ function __construct($p = array()) # Read and merge texts from php files if none defined yet foreach ($p['phpfiles'] as $phpfile) { - $oldtext = $this->statictext; - if (is_array($ret = include($phpfile))) + $this->statictext += ($ret = include($phpfile)); + + if ($GLOBALS['debug_texts']) { - $this->statictext += $ret; - if ($GLOBALS['debug_texts']) - { - $service = strpos($phpfile, $GLOBALS['ULTRAHOME']) !== false ? '' : it::match('/www/([^/.]+)', $phpfile); - $this->label_to_service += array_combine(array_keys($ret), array_fill(0, count($ret), $service)); - } + $service = strpos($phpfile, $GLOBALS['ULTRAHOME']) !== false ? '' : it::match('/www/([^/.]+)', $phpfile); + $this->label_to_service += array_combine(array_keys($ret), array_fill(0, count($ret), $service)); } - else - $this->statictext = $oldtext + $this->statictext; # FIXME: compatibility mode } # Get array of supported languages and their names -- cgit v1.2.3