diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-11-23 23:53:55 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-12-09 14:34:23 +0100 |
commit | 2ce2de0ae523e91b90c39a91fdcc975f06a7674a (patch) | |
tree | b62b352eefb690e9a1b5e0c863aa13c0d72056bd /lib/private/server.php | |
parent | 04f4565fcda4c7482c25681863237d05e850562a (diff) | |
download | nextcloud-server-2ce2de0ae523e91b90c39a91fdcc975f06a7674a.tar.gz nextcloud-server-2ce2de0ae523e91b90c39a91fdcc975f06a7674a.zip |
add icommentsmanger and icomment implementation
register CommentsManager service, allow override, document in config.sample.php
don't insert autoincrement ids in tests, because of dislikes from oracle and pgsql
specify timezone in null date
only accepts strings for ID parameter that can be converted to int
replace forgotten hardcoded IDs in tests
react on deleted users
react on file deletion
Postgresql compatibility
lastInsertId needs *PREFIX* with the table name
do not listen for file deletion, because it is not reliable (trashbin, external storages)
add runtime cache for comments
Diffstat (limited to 'lib/private/server.php')
-rw-r--r-- | lib/private/server.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/private/server.php b/lib/private/server.php index 6692e6f6bbf..ecac18d6a9b 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -528,6 +528,13 @@ class Server extends SimpleContainer implements IServerContainer { }); return $manager; }); + $this->registerService('CommentsManager', function(Server $c) { + $config = $c->getConfig(); + $factoryClass = $config->getSystemValue('comments.managerFactory', '\OC\Comments\ManagerFactory'); + /** @var \OCP\Comments\ICommentsManagerFactory $factory */ + $factory = new $factoryClass(); + return $factory->getManager(); + }); $this->registerService('EventDispatcher', function() { return new EventDispatcher(); }); @@ -1121,6 +1128,10 @@ class Server extends SimpleContainer implements IServerContainer { return $this->query('NotificationManager'); } + public function getCommentsManager() { + return $this->query('CommentsManager'); + } + /** * @return \OC\IntegrityCheck\Checker */ |