Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-04-19 14:05:38 +0300
committerCôme Chilliet (Rebase PR Action) <come-nc@users.noreply.github.com>2022-09-29 18:15:28 +0300
commit92a5a8f075fe5e6b72037cc4a668090d3a8cacf5 (patch)
tree198134dd6411f82a077a70b37bec735024437e1d /core
parentb4708fb9f003a306edcfe0346e25f9583c4c162a (diff)
Cleanup tags and Share component
- Port to LoggerInterface - Use IDBConnection and IQueryBuilder instead of raw SQL and OC_DB - Use IEventListener instead of hooks - Remove the now unused OC_DB and OC_DB_StatementWrapper legacy utils Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'core')
-rw-r--r--core/Application.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/Application.php b/core/Application.php
index 158375984d1..749f2d176d4 100644
--- a/core/Application.php
+++ b/core/Application.php
@@ -49,6 +49,7 @@ use OC\DB\MissingIndexInformation;
use OC\DB\MissingPrimaryKeyInformation;
use OC\DB\SchemaWrapper;
use OC\Metadata\FileEventListener;
+use OC\TagManager;
use OCP\AppFramework\App;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Events\Node\NodeDeletedEvent;
@@ -78,7 +79,7 @@ class Application extends App {
$server = $container->getServer();
/** @var IEventDispatcher $eventDispatcher */
- $eventDispatcher = $server->query(IEventDispatcher::class);
+ $eventDispatcher = $server->get(IEventDispatcher::class);
$notificationManager = $server->getNotificationManager();
$notificationManager->registerNotifierService(CoreNotifier::class);
@@ -325,10 +326,15 @@ class Application extends App {
/** @var IConfig $config */
$config = $container->get(IConfig::class);
if ($config->getSystemValueBool('enable_file_metadata', true)) {
- $eventDispatcher = \OC::$server->get(IEventDispatcher::class);
+ /** @psalm-suppress InvalidArgument */
$eventDispatcher->addServiceListener(NodeDeletedEvent::class, FileEventListener::class);
+ /** @psalm-suppress InvalidArgument */
$eventDispatcher->addServiceListener(NodeRemovedFromCache::class, FileEventListener::class);
+ /** @psalm-suppress InvalidArgument */
$eventDispatcher->addServiceListener(NodeWrittenEvent::class, FileEventListener::class);
}
+
+ // Tags
+ $eventDispatcher->addServiceListener(UserDeletedEvent::class, TagManager::class);
}
}