Fix path match

This commit is contained in:
Joas Schilling 2016-02-02 11:12:16 +01:00
parent b5e40bc8f6
commit 7f563dc3e9
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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);
};