Skip to content
Snippets Groups Projects
Unverified Commit 2f70a250 authored by Morris Jobke's avatar Morris Jobke Committed by GitHub
Browse files

Merge pull request #23978 from nextcloud/enh/query_servercontainer_first

First query the server container
parents 46002a46 889bb44b
No related branches found
No related tags found
No related merge requests found
...@@ -133,6 +133,12 @@ class ServerContainer extends SimpleContainer { ...@@ -133,6 +133,12 @@ class ServerContainer extends SimpleContainer {
public function query(string $name, bool $autoload = true) { public function query(string $name, bool $autoload = true) {
$name = $this->sanitizeName($name); $name = $this->sanitizeName($name);
try {
return parent::query($name, false);
} catch (QueryException $e) {
// Continue with general autoloading then
}
// In case the service starts with OCA\ we try to find the service in // In case the service starts with OCA\ we try to find the service in
// the apps container first. // the apps container first.
if (($appContainer = $this->getAppContainerForService($name)) !== null) { if (($appContainer = $this->getAppContainerForService($name)) !== null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment