});
}
- 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);
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);
}
}