From 8138b05032186280da7e57706d62e309d6bf2440 Mon Sep 17 00:00:00 2001 From: nupplaPhil Date: Sun, 19 Jan 2020 17:11:48 +0100 Subject: [PATCH] fix L10n path after move --- src/Core/L10n.php | 12 ++++++------ tests/src/Core/{L10n => }/L10nTest.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) rename tests/src/Core/{L10n => }/L10nTest.php (98%) diff --git a/src/Core/L10n.php b/src/Core/L10n.php index 3f92dd5800..0238af3bd1 100644 --- a/src/Core/L10n.php +++ b/src/Core/L10n.php @@ -115,13 +115,13 @@ class L10n $addons = $this->dba->select('addon', ['name'], ['installed' => true]); while ($p = $this->dba->fetch($addons)) { $name = Strings::sanitizeFilePathItem($p['name']); - if (file_exists("addon/$name/lang/$lang/strings.php")) { - include __DIR__ . "/../../../addon/$name/lang/$lang/strings.php"; + if (file_exists(__DIR__ . "/../../addon/$name/lang/$lang/strings.php")) { + include __DIR__ . "/../../addon/$name/lang/$lang/strings.php"; } } - if (file_exists(__DIR__ . "/../../../view/lang/$lang/strings.php")) { - include __DIR__ . "/../../../view/lang/$lang/strings.php"; + if (file_exists(__DIR__ . "/../../view/lang/$lang/strings.php")) { + include __DIR__ . "/../../view/lang/$lang/strings.php"; } $this->lang = $lang; @@ -191,8 +191,8 @@ class L10n while (count($lang_code)) { // try to mix them so we can get double-code parts too $match_lang = strtolower(join('-', $lang_code)); - if (file_exists(__DIR__ . "/../../../view/lang/$match_lang") && - is_dir(__DIR__ . "/../../../view/lang/$match_lang")) { + if (file_exists(__DIR__ . "/../../view/lang/$match_lang") && + is_dir(__DIR__ . "/../../view/lang/$match_lang")) { if ($lang_quality > $current_q) { $current_lang = $match_lang; $current_q = $lang_quality; diff --git a/tests/src/Core/L10n/L10nTest.php b/tests/src/Core/L10nTest.php similarity index 98% rename from tests/src/Core/L10n/L10nTest.php rename to tests/src/Core/L10nTest.php index b9f6681f4b..7d30d31271 100644 --- a/tests/src/Core/L10n/L10nTest.php +++ b/tests/src/Core/L10nTest.php @@ -1,6 +1,6 @@