]> source.dussan.org Git - nextcloud-server.git/commitdiff
Also cache the namespace from appinfo
authorJoas Schilling <coding@schilljs.com>
Wed, 22 Mar 2017 10:50:31 +0000 (11:50 +0100)
committerJoas Schilling <coding@schilljs.com>
Wed, 22 Mar 2017 10:50:31 +0000 (11:50 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/AppFramework/App.php

index e15e4a797eae2711015891444a48e796fcc65c1b..5a7bc8fad43af35e221c4b5fa7e35c5a82a68cce 100644 (file)
@@ -61,11 +61,12 @@ class App {
 
                $appInfo = \OC_App::getAppInfo($appId);
                if (isset($appInfo['namespace'])) {
-                       return $topNamespace . trim($appInfo['namespace']);
+                       self::$nameSpaceCache[$appId] = trim($appInfo['namespace']);
+               } else {
+                       // if the tag is not found, fall back to uppercasing the first letter
+                       self::$nameSpaceCache[$appId] = ucfirst($appId);
                }
 
-               // if the tag is not found, fall back to uppercasing the first letter
-               self::$nameSpaceCache[$appId] = ucfirst($appId);
                return $topNamespace . self::$nameSpaceCache[$appId];
        }