"- 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"
This commit is contained in:
Ralf Becker 2009-06-14 13:26:57 +00:00
parent a0ca8afe63
commit 893bff3c61

View File

@ -729,7 +729,9 @@ class filemanager_ui
$props = array(); $props = array();
foreach($content['old'] as $name => $old_value) 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') if ($name == 'name')
{ {
@ -791,12 +793,12 @@ class filemanager_ui
} }
if ($ok && !$failed) 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]; $content['old'][$name] = $content[$name];
} }
elseif($failed) 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).')' : '')); ($ok ? ' ('.lang('%1 failed, %2 succeded',$failed,$ok).')' : ''));
} }
} }