From f6f3b89f8b3703592f5736368007873c25da8f44 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 28 Jul 2016 15:10:39 +0200 Subject: [PATCH] * Filemanager/EPL: fix broken notification / subscription to folders Do not check for (no longer existing) $GLOBALS[egw]->hooks but for no class setup_process, to not call them during install or update. --- api/src/Vfs/StreamWrapper.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/src/Vfs/StreamWrapper.php b/api/src/Vfs/StreamWrapper.php index fde678cbef..3c7813598c 100644 --- a/api/src/Vfs/StreamWrapper.php +++ b/api/src/Vfs/StreamWrapper.php @@ -358,7 +358,7 @@ class StreamWrapper implements StreamWrapperIface // causing eg. notifications to be ignored, because of previous size 0, when using WebDAV clearstatcache(false); - if (isset($GLOBALS['egw']) && isset($GLOBALS['egw']->hooks)) + if (!class_exists('setup_process', false)) { Api\Hooks::process(array( 'location' => str_replace('b','',$this->opened_stream_mode) == 'r' ? 'vfs_read' : @@ -554,7 +554,7 @@ class StreamWrapper implements StreamWrapperIface $ok = unlink($url); // call "vfs_unlink" hook only after successful unlink, with data from (not longer possible) stat call - if ($ok && isset($GLOBALS['egw']) && isset($GLOBALS['egw']->hooks)) + if ($ok && !class_exists('setup_process', false)) { Api\Hooks::process(array( 'location' => 'vfs_unlink', @@ -607,7 +607,7 @@ class StreamWrapper implements StreamWrapperIface error_log(__METHOD__."('$path_from','$path_to') url_from='$url_from', url_to='$url_to' returning ".array2string($ret)); } // call "vfs_rename" hook - if ($ret && isset($GLOBALS['egw']) && isset($GLOBALS['egw']->hooks)) + if ($ret && !class_exists('setup_process', false)) { Api\Hooks::process(array( 'location' => 'vfs_rename', @@ -640,7 +640,7 @@ class StreamWrapper implements StreamWrapperIface $ret = mkdir($url,$mode,$options); // call "vfs_mkdir" hook - if ($ret && isset($GLOBALS['egw']) && isset($GLOBALS['egw']->hooks)) + if ($ret && !class_exists('setup_process', false)) { Api\Hooks::process(array( 'location' => 'vfs_mkdir', @@ -678,7 +678,7 @@ class StreamWrapper implements StreamWrapperIface $ok = rmdir($url); // call "vfs_rmdir" hook, only after successful rmdir - if ($ok && isset($GLOBALS['egw']) && isset($GLOBALS['egw']->hooks)) + if ($ok && !class_exists('setup_process', false)) { Api\Hooks::process(array( 'location' => 'vfs_rmdir',