Code

Do not mark added folders as removed, just remove them.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Nov 2010 17:29:30 +0000 (17:29 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Nov 2010 17:29:30 +0000 (17:29 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20310 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/groupware/personal/groupware/FolderWidget/class_FolderWidget.inc

index 886ef33c45015049514db2f0cccb0a599684a8a4..b182d9ae15d20e1305c1956d9d5275eef824a56f 100644 (file)
@@ -307,8 +307,13 @@ class FolderWidget extends plugin
                         $this->_recursiveRemoveByBase($this->folderList['recursive'], $child['base']);
                     }
                 }
-
-                $arr[$path]['status'] = 'removed';
+                
+                // Remove the the entry instead of setting its status if it was just added.
+                if($arr[$path]['status'] == "added"){
+                    unset($arr[$path]) ;
+                }else{
+                    $arr[$path]['status'] = 'removed';
+                }
             }elseif(isset($item['children']) && count($item['children'])){
                 $ret = array_merge($ret, $this->_recursiveRemoveByBase($arr[$path]['children'], $base));
             }