summaryrefslogtreecommitdiffstats
path: root/lib/private/server.php
diff options
context:
space:
mode:
authorBernhard Reiter <ockham@raz.or.at>2014-09-08 19:58:43 +0200
committerBernhard Reiter <ockham@raz.or.at>2014-10-14 00:06:07 +0200
commit5471189fe6b8d2b4ef2608a57b7ea24518a1dcb8 (patch)
tree359b03ca796182e2bf9c874222853ae4d1ee24b5 /lib/private/server.php
parentcf6fb2c2e49718ad4b9120d42db28b42fb2ff038 (diff)
downloadnextcloud-server-5471189fe6b8d2b4ef2608a57b7ea24518a1dcb8.tar.gz
nextcloud-server-5471189fe6b8d2b4ef2608a57b7ea24518a1dcb8.zip
Implement Tag and TagMapper classes.
Subclassed from \OCP\AppFramework\Db\Entity and Mapper, respectively. This will allow us to also deal with shared tags.
Diffstat (limited to 'lib/private/server.php')
-rw-r--r--lib/private/server.php7
1 files changed, 6 insertions, 1 deletions
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