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