Code

Removed folder test class and fixed groupware account creation
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Oct 2010 14:24:23 +0000 (14:24 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Oct 2010 14:24:23 +0000 (14:24 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20004 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/groupware/personal/groupware/class_Groupware.inc
gosa-plugins/groupware/personal/groupware/class_folderTest.inc [deleted file]

index 69c1e2bbc89e63abe131d25d9916d3a1d5d796b5..a4c4b8a4a53e8f2b697b0216381a27d50aca7a5a 100644 (file)
@@ -796,11 +796,14 @@ class Groupware extends plugin
         // Get rpc handle to create or update the account
         if(!$this->initially_was_account){
             $this->rpcExec('gwAcctAdd', $this->uid, $this->mailAddress);
-            if(!$rpc->succeess()){
+            if($this->rpcError){
                 msg_dialog::display(_("Error"), _("Groupware account creation failed!"), ERROR_DIALOG);
+                return;
             }
         }
 
+        
+
         $this->groupwareDao->saveFoldersAndAcls($this->uid, $this->mailFolder);
 
         // Save the primary Email Address.
diff --git a/gosa-plugins/groupware/personal/groupware/class_folderTest.inc b/gosa-plugins/groupware/personal/groupware/class_folderTest.inc
deleted file mode 100644 (file)
index d9815c7..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-<?php
-
-if(!defined("GROUPWARE_LOOKUP")){
-
-    define ("GROUPWARE_LOOKUP", 1);
-    define ("GROUPWARE_READ", 2);
-    define ("GROUPWARE_STATUS", 4);
-    define ("GROUPWARE_WRITE", 8);
-    define ("GROUPWARE_INSERT", 16);
-    define ("GROUPWARE_POST", 32);
-    define ("GROUPWARE_CREATE", 64);
-    define ("GROUPWARE_DELETE", 128);
-    define ("GROUPWARE_ADMINISTRATE", 256);
-
-    define ("GROUPWARE_RIGHTS_NONE", 0);
-    define ("RIGHTS_GROUPWARE_READ",  GROUPWARE_LOOKUP | GROUPWARE_READ | GROUPWARE_STATUS);
-    define ("RIGHTS_GROUPWARE_POST", RIGHTS_GROUPWARE_READ | GROUPWARE_POST);
-    define ("GROUPWARE_RIGHTS_APPEND", RIGHTS_GROUPWARE_POST | GROUPWARE_INSERT);
-    define ("RIGHTS_GROUPWARE_WRITE", GROUPWARE_RIGHTS_APPEND | GROUPWARE_WRITE | GROUPWARE_CREATE | GROUPWARE_DELETE);
-    define ("GROUPWARE_RIGHTS_ALL", RIGHTS_GROUPWARE_WRITE | GROUPWARE_ADMINISTRATE);
-}
-
-class FolderTest extends plugin 
-{
-    var $FolderWidget = NULL;
-
-    function __construct($config, $dn)
-    {
-        plugin::plugin($config, $dn);
-        $this->folderList = $this->getFolderList();
-    }
-
-    function getPermissions()
-    {
-        $ret[GROUPWARE_RIGHTS_NONE] = _("None");
-        $ret[RIGHTS_GROUPWARE_READ] = _("Read");
-        $ret[RIGHTS_GROUPWARE_POST] = _("Post");
-        $ret[GROUPWARE_RIGHTS_APPEND] = _("Append");
-        $ret[RIGHTS_GROUPWARE_WRITE] = _("Write");
-        $ret[GROUPWARE_RIGHTS_ALL] = _("All");
-        return($ret);
-    }
-    
-    function execute()
-    {
-
-        if(isset($_POST['FolderWidget_cancel'])) $this->FolderWidget = NULL;
-        if(isset($_POST['FolderWidget_ok'])){
-            $this->FolderWidget->save_object();
-            $msgs = $this->FolderWidget->check();
-            if(count($msgs)){
-                msg_dialog::displayChecks($msgs);
-            }else{
-                $this->folderList = $this->FolderWidget->save();
-                $this->FolderWidget = NULL;
-            }
-        }
-        if(isset($_POST['configureFolder'])){
-            $this->FolderWidget = new FolderWidget($this->config,$this->folderList, "user/wiwu/Inbox");
-            $this->FolderWidget->setPermissions($this->getPermissions());
-            $this->FolderWidget->acl_base = $this->acl_base;
-            $this->FolderWidget->acl_category = $this->acl_category;
-        }
-        $this->dialog = FALSE;
-        if($this->FolderWidget instanceOf FolderWidget){
-            $this->FolderWidget->save_object();
-            $this->dialog = TRUE;
-            return($this->FolderWidget->execute());
-        }
-   
-        return("<button name='configureFolder'>edit</button>") ;
-    }
-
-
-    function getFolderList()
-    {
-        
-        $ret['user/wiwu/Inbox/Aufgaben']['name'] = "Aufgaben"; 
-        $ret['user/wiwu/Inbox/Aufgaben']['status'] = '';
-        $ret['user/wiwu/Inbox/Aufgaben']['type'] = 'user';
-        $ret['user/wiwu/Inbox/Aufgaben']['acls'] = array();
-
-        $ret['user/wiwu/Inbox/Gesendet']['name'] = "Gesendet"; 
-        $ret['user/wiwu/Inbox/Gesendet']['status'] = '';
-        $ret['user/wiwu/Inbox/Gesendet']['type'] = 'user';
-        $ret['user/wiwu/Inbox/Gesendet']['acls'] = array();
-
-        $ret['user/wiwu/Inbox/Gesendet/2009']['name'] = "2009"; 
-        $ret['user/wiwu/Inbox/Gesendet/2009']['status'] = '';
-        $ret['user/wiwu/Inbox/Gesendet/2009']['type'] = 'user';
-        $ret['user/wiwu/Inbox/Gesendet/2009']['acls'] = array();
-
-        $ret['user/wiwu/Inbox/Gesendet/2010']['name'] = "2010"; 
-        $ret['user/wiwu/Inbox/Gesendet/2010']['status'] = '';
-        $ret['user/wiwu/Inbox/Gesendet/2010']['type'] = 'user';
-        $ret['user/wiwu/Inbox/Gesendet/2010']['acls'] = array();
-
-        return($ret);
-    }
-}
-
-?>