From 8dfb2826c8a9d758ee31d4e061c4a49c8eb2b240 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 12 Oct 2010 14:24:23 +0000 Subject: [PATCH] Removed folder test class and fixed groupware account creation git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20004 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../personal/groupware/class_Groupware.inc | 5 +- .../personal/groupware/class_folderTest.inc | 102 ------------------ 2 files changed, 4 insertions(+), 103 deletions(-) delete mode 100644 gosa-plugins/groupware/personal/groupware/class_folderTest.inc diff --git a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc index 69c1e2bbc..a4c4b8a4a 100644 --- a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc +++ b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc @@ -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 index d9815c78a..000000000 --- a/gosa-plugins/groupware/personal/groupware/class_folderTest.inc +++ /dev/null @@ -1,102 +0,0 @@ -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("") ; - } - - - 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); - } -} - -?> -- 2.30.2