From 8569f2d627f3ddc43aa9a77aa07433e343a40fe8 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 14 Jun 2009 13:27:12 +0000 Subject: [PATCH] "- if user wants to change permissions of all subfolders, do NOT check if permissions of current folder is realy changed (as the requested change can be elsewhere) - only give \"permissions changed/failed\" message once" --- filemanager/inc/class.filemanager_ui.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/filemanager/inc/class.filemanager_ui.inc.php b/filemanager/inc/class.filemanager_ui.inc.php index 431a939622..f59adf4c7f 100644 --- a/filemanager/inc/class.filemanager_ui.inc.php +++ b/filemanager/inc/class.filemanager_ui.inc.php @@ -627,7 +627,9 @@ class filemanager_ui $props = array(); foreach($content['old'] as $name => $old_value) { - if (isset($content[$name]) && $old_value != $content[$name]) + if (isset($content[$name]) && ($old_value != $content[$name] || + // do not check for modification, if modify_subs is checked! + $content['modify_subs'] && in_array($name,array('uid','gid','perms'))) && $name != 'uid' || egw_vfs::$is_root) { if ($name == 'name') { @@ -689,12 +691,12 @@ class filemanager_ui } if ($ok && !$failed) { - $msg .= lang('Permissions of %1 changed.',$path.' '.lang('and all it\'s childeren')); + if(!$perm_changed++) $msg .= lang('Permissions of %1 changed.',$path.' '.lang('and all it\'s childeren')); $content['old'][$name] = $content[$name]; } elseif($failed) { - $msg .= lang('Failed to change permissions of %1!',$path.lang('and all it\'s childeren'). + if(!$perm_failed++) $msg .= lang('Failed to change permissions of %1!',$path.lang('and all it\'s childeren'). ($ok ? ' ('.lang('%1 failed, %2 succeded',$failed,$ok).')' : '')); } }