X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FL10n.php;h=1d8cfa705bae359df110a42d826b28e5e11712a4;hb=911ed3d6ba98149ed6d400d554e7a0e10bd1c273;hp=a74f18fa6bd45ae48827c44e91e2e4bc67d14b3c;hpb=87bb4d44a2eccec4180b9cd0a70f9011b3b759bc;p=friendica.git diff --git a/src/Core/L10n.php b/src/Core/L10n.php index a74f18fa6b..1d8cfa705b 100644 --- a/src/Core/L10n.php +++ b/src/Core/L10n.php @@ -1,6 +1,6 @@ dba = $dba; + $this->config = $config; $this->loadTranslationTable(L10n::detectLanguage($server, $get, $config->get('system', 'language', self::DEFAULT))); $this->setSessionVariable($session); @@ -157,9 +162,9 @@ class L10n $a->strings = []; // load enabled addons strings - $addons = $this->dba->select('addon', ['name'], ['installed' => true]); - while ($p = $this->dba->fetch($addons)) { - $name = Strings::sanitizeFilePathItem($p['name']); + $addons = array_keys($this->config->get('addons') ?? []); + foreach ($addons as $addon) { + $name = Strings::sanitizeFilePathItem($addon); if (file_exists(__DIR__ . "/../../addon/$name/lang/$lang/strings.php")) { include __DIR__ . "/../../addon/$name/lang/$lang/strings.php"; } @@ -329,7 +334,7 @@ class L10n // for some languages there is only a single array item $s = $t[0]; } - // if $t is empty, skip it, because empty strings array are indended + // if $t is empty, skip it, because empty strings array are intended // to make string file smaller when there's no translation } else { $s = $t;