From 5471189fe6b8d2b4ef2608a57b7ea24518a1dcb8 Mon Sep 17 00:00:00 2001 From: Bernhard Reiter Date: Mon, 8 Sep 2014 19:58:43 +0200 Subject: Implement Tag and TagMapper classes. Subclassed from \OCP\AppFramework\Db\Entity and Mapper, respectively. This will allow us to also deal with shared tags. --- lib/private/server.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/private/server.php') diff --git a/lib/private/server.php b/lib/private/server.php index 7fa06298b29..ff34cfdccb6 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -14,6 +14,7 @@ use OC\Security\Crypto; use OC\Security\SecureRandom; use OCP\IServerContainer; use OCP\ISession; +use OC\Tagging\TagMapper; /** * Class Server @@ -68,9 +69,13 @@ class Server extends SimpleContainer implements IServerContainer { $this->registerService('PreviewManager', function ($c) { return new PreviewManager(); }); + $this->registerService('TagMapper', function($c) { + return new TagMapper($c->getDb()); + }); $this->registerService('TagManager', function ($c) { + $tagMapper = $c->query('TagMapper'); $user = \OC_User::getUser(); - return new TagManager($user); + return new TagManager($tagMapper, $user); }); $this->registerService('RootFolder', function ($c) { // TODO: get user and user manager from container as well -- cgit v1.2.3