From 4ec4914bb4ad6ef161e9093ec1d76573626c9367 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt <dev@bernhard-posselt.com> Date: Wed, 14 Jan 2015 14:57:56 +0100 Subject: [PATCH] move check into addTranslation method --- lib/private/util.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/private/util.php b/lib/private/util.php index 13208911f4..f544b7b6b3 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -10,7 +10,6 @@ class OC_Util { public static $headers = array(); private static $rootMounted = false; private static $fsSetup = false; - private static $loadedScriptTranslations = array(); private static function initLocalStorageRootFS() { // mount local file backend as root @@ -363,14 +362,7 @@ class OC_Util { public static function addScript($application, $file = null) { $path = OC_Util::generatePath($application, 'js', $file); if (!in_array($path, self::$scripts)) { - // load javascript translations if it is the first time an app's - // script is loaded. - if (!isset(self::$loadedScriptTranslations[$application]) && $file && $application !== 'core') { - error_log("adding " . $application . " " . $file); - - self::addTranslations($application); - self::$loadedScriptTranslations[$application] = true; - } + self::addTranslations($application); self::$scripts[] = $path; } } @@ -406,9 +398,7 @@ class OC_Util { $path = "l10n/$languageCode"; } if (!in_array($path, self::$scripts)) { - error_log("translation " . $path); self::$scripts[] = $path; - error_log(print_r(self::$scripts, true)); } } -- GitLab