diff --git a/www/lib/CoreLibs/Admin/Backend.php b/www/lib/CoreLibs/Admin/Backend.php index fcb5e179..93885c78 100644 --- a/www/lib/CoreLibs/Admin/Backend.php +++ b/www/lib/CoreLibs/Admin/Backend.php @@ -105,6 +105,7 @@ class Backend extends \CoreLibs\DB\IO /** * set the language encoding and language settings + * use $OVERRIDE_LANG to override all language settings * the default charset from _SESSION login or from * config DEFAULT ENCODING * the lang full name for mo loading from _SESSION login diff --git a/www/lib/CoreLibs/Basic.php b/www/lib/CoreLibs/Basic.php index 115859b8..ce0de97b 100644 --- a/www/lib/CoreLibs/Basic.php +++ b/www/lib/CoreLibs/Basic.php @@ -1236,12 +1236,22 @@ class Basic $path[] = $key_lookin; } else { foreach ($haystack as $key => $val) { - if (is_scalar($val) && $val === $needle && empty($key_lookin)) { - break; - } elseif (is_scalar($val) && !empty($key_lookin) && $key === $key_lookin && $val == $needle) { + if (is_scalar($val) && + $val === $needle && + empty($key_lookin) + ) { $path[] = $key; break; - } elseif (is_array($val) && $path = Basic::arraySearchRecursive($needle, $val, $key_lookin)) { + } elseif (is_scalar($val) && + !empty($key_lookin) && + $key === $key_lookin && + $val == $needle + ) { + $path[] = $key; + break; + } elseif (is_array($val) && + $path = Basic::arraySearchRecursive($needle, $val, $key_lookin) + ) { array_unshift($path, $key); break; }