summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-05-02 09:45:25 +0200
committerGitHub <noreply@github.com>2018-05-02 09:45:25 +0200
commitdfe6d65410ba2f8ae671a7f75764639533c8c068 (patch)
tree77c03421bd214f568b94036da8bb549e0ce0470c
parente9c6ec4b2246a338d2c0883be06f8442d7264ca4 (diff)
parentf5b143e318d58e4221f27e79d88c556b0cbb5f8f (diff)
downloadnextcloud-server-dfe6d65410ba2f8ae671a7f75764639533c8c068.tar.gz
nextcloud-server-dfe6d65410ba2f8ae671a7f75764639533c8c068.zip
Merge pull request #9310 from nextcloud/bugfix/noid/allow-to-inject-collaboration-search-result
Allow to inject ISearchResult
-rw-r--r--lib/private/AppFramework/DependencyInjection/DIContainer.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php
index 37a34106dbe..c82ac5255dd 100644
--- a/lib/private/AppFramework/DependencyInjection/DIContainer.php
+++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php
@@ -46,6 +46,7 @@ use OC\AppFramework\Middleware\Security\RateLimitingMiddleware;
use OC\AppFramework\Middleware\Security\SecurityMiddleware;
use OC\AppFramework\Middleware\SessionMiddleware;
use OC\AppFramework\Utility\SimpleContainer;
+use OC\Collaboration\Collaborators\SearchResult;
use OC\Core\Middleware\TwoFactorMiddleware;
use OC\RichObjectStrings\Validator;
use OC\ServerContainer;
@@ -53,6 +54,7 @@ use OCP\AppFramework\Http\IOutput;
use OCP\AppFramework\IAppContainer;
use OCP\AppFramework\QueryException;
use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\Collaboration\Collaborators\ISearchResult;
use OCP\Files\Folder;
use OCP\Files\IAppData;
use OCP\GlobalScale\IConfig;
@@ -62,7 +64,6 @@ use OCP\IRequest;
use OCP\IServerContainer;
use OCP\IUserSession;
use OCP\RichObjectStrings\IValidator;
-use OCP\Util;
use OCP\Encryption\IManager;
use OCA\WorkflowEngine\Manager;
@@ -144,6 +145,8 @@ class DIContainer extends SimpleContainer implements IAppContainer {
return $c;
});
+ $this->registerAlias(ISearchResult::class, SearchResult::class);
+
// commonly used attributes
$this->registerService('UserId', function ($c) {
return $c->query(IUserSession::class)->getSession()->get('user_id');