Code

Updated Folder Widget
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 15 Oct 2010 08:59:51 +0000 (08:59 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 15 Oct 2010 08:59:51 +0000 (08:59 +0000)
-Do not allow to remove the root folder

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20056 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 3a88a3b0c72ac7ac9694cb7cfc2380b952ca0c13..368e3b06de17d59ea6b2fab2035e316957b4a58c 100644 (file)
@@ -257,6 +257,10 @@ class FolderWidget extends plugin
      */
     function removeByBase($base)
     {
+        // Do not allow to remove the root base.
+        // This would mean the account itself was removed.
+        if($base = $this->rootBase) return;
+    
         $this->_recursiveRemoveByBase($this->folderList['recursive'], $base);
         $this->_recursiveRemoveByBase($this->folderList['linear'], $base);
         $this->FolderWidgetListing->setFolderList($this->folderList);