* 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.
This commit is contained in:
Ralf Becker 2016-07-28 15:10:39 +02:00
parent 53449be87f
commit f6f3b89f8b

View File

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