summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-03-22 10:13:14 +0100
committerJoas Schilling <coding@schilljs.com>2017-03-22 10:13:14 +0100
commit9208f6379cf74731e2cd2acb77cac0403bacd00e (patch)
tree372154694081c1e3c0f779db6467936e369ae0c5 /lib
parent67909cf87bf17e6369d7e244aa956060aa40d25d (diff)
downloadnextcloud-server-9208f6379cf74731e2cd2acb77cac0403bacd00e.tar.gz
nextcloud-server-9208f6379cf74731e2cd2acb77cac0403bacd00e.zip
buildAppNamespace already has the fallback
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/AppFramework/DependencyInjection/DIContainer.php12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php
index 9d27aff4869..9078baf1d2f 100644
--- a/lib/private/AppFramework/DependencyInjection/DIContainer.php
+++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php
@@ -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);
}
}