From 7f563dc3e9a03284d9eff69214b6686cf9eb1916 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 2 Feb 2016 11:12:16 +0100 Subject: [PATCH] Fix path match --- apps/systemtags/activity/listener.php | 2 +- apps/systemtags/appinfo/app.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/systemtags/activity/listener.php b/apps/systemtags/activity/listener.php index 3afbde7a66..9b6597119c 100644 --- a/apps/systemtags/activity/listener.php +++ b/apps/systemtags/activity/listener.php @@ -163,7 +163,7 @@ class Listener { /** @var Node $node */ $node = array_shift($nodes); $path = $node->getPath(); - if (strpos($path, '/' . $owner . '/files') === 0) { + if (strpos($path, '/' . $owner . '/files/') === 0) { $path = substr($path, strlen('/' . $owner . '/files')); } // Get all users that have access to the mount point diff --git a/apps/systemtags/appinfo/app.php b/apps/systemtags/appinfo/app.php index d948f4857f..0bb57e1227 100644 --- a/apps/systemtags/appinfo/app.php +++ b/apps/systemtags/appinfo/app.php @@ -48,11 +48,14 @@ $eventDispatcher->addListener( $activityManager = \OC::$server->getActivityManager(); $activityManager->registerExtension(function() { $application = new \OCP\AppFramework\App('systemtags'); - return $application->getContainer()->query('OCA\SystemTags\Activity\Extension'); + /** @var \OCA\SystemTags\Activity\Extension $extension */ + $extension = $application->getContainer()->query('OCA\SystemTags\Activity\Extension'); + return $extension; }); $managerListener = function(ManagerEvent $event) use ($activityManager) { $application = new \OCP\AppFramework\App('systemtags'); + /** @var \OCA\SystemTags\Activity\Listener $listener */ $listener = $application->getContainer()->query('OCA\SystemTags\Activity\Listener'); $listener->event($event); }; @@ -63,6 +66,7 @@ $eventDispatcher->addListener(ManagerEvent::EVENT_UPDATE, $managerListener); $mapperListener = function(MapperEvent $event) use ($activityManager) { $application = new \OCP\AppFramework\App('systemtags'); + /** @var \OCA\SystemTags\Activity\Listener $listener */ $listener = $application->getContainer()->query('OCA\SystemTags\Activity\Listener'); $listener->mapperEvent($event); };