]> source.dussan.org Git - nextcloud-server.git/commitdiff
buildAppNamespace already has the fallback
authorJoas Schilling <coding@schilljs.com>
Wed, 22 Mar 2017 09:13:14 +0000 (10:13 +0100)
committerJoas Schilling <coding@schilljs.com>
Wed, 22 Mar 2017 09:13:14 +0000 (10:13 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/AppFramework/DependencyInjection/DIContainer.php

index 9d27aff4869aa123ac1f6eb696b9cd659407fc9d..9078baf1d2fd0472283f021bb7362bef181b0784 100644 (file)
@@ -373,15 +373,6 @@ class DIContainer extends SimpleContainer implements IAppContainer {
                });
        }
 
-       private function getFallbackNamespace($name) {
-               $segments = explode('\\', $name);
-               if (count($segments) >= 2) {
-                       return $segments[0] . '\\' . ucfirst(strtolower($segments[1]));
-               } else {
-                       return null;
-               }
-       }
-
        public function query($name) {
                $name = $this->sanitizeName($name);
 
@@ -392,8 +383,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
                                return parent::query($name);
                        } else if ($this['AppName'] === 'core' && strpos($name, 'OC\\Core\\') === 0) {
                                return parent::query($name);
-                       } else if (strpos($name, \OC\AppFramework\App::buildAppNamespace($this['AppName'])) === 0 ||
-                               $this->getFallbackNamespace($name) === \OC\AppFramework\App::buildAppNamespace($this['AppName'])) {
+                       } else if (strpos($name, \OC\AppFramework\App::buildAppNamespace($this['AppName']) . '\\') === 0) {
                                return parent::query($name);
                        }
                }