From: hzerres Date: Mon, 13 Sep 2010 13:00:53 +0000 (+0000) Subject: checked in broken template - removed features. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ae4cef4bb01869358f677b35017c5c2b11ade893;p=gosa.git checked in broken template - removed features. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19622 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/groupware/personal/groupware/class_groupware.inc b/gosa-plugins/groupware/personal/groupware/class_groupware.inc index 220a2a0dc..9f3424437 100644 --- a/gosa-plugins/groupware/personal/groupware/class_groupware.inc +++ b/gosa-plugins/groupware/personal/groupware/class_groupware.inc @@ -27,6 +27,7 @@ class groupware extends plugin var $rpcError = FALSE; var $rpcErrorMessage = ""; + /* var $attributes = array( "mailAddress", "mailLocation", @@ -49,6 +50,7 @@ class groupware extends plugin "localDeliveryOnly", "dropOwnMails" ); + */ var $enabledFeatures = array(); @@ -139,6 +141,38 @@ class groupware extends plugin $this->groupwareDao = new groupware_dao($this); $features = array(); + $featureReq = array( + "primaryMail" => array( + 'acctGetPrimaryMailAddress'), + "quotaUsage" => array( + 'acctGetQuota'), + "quotaSize" => array( + 'acctSetQuota','acctGetQuota'), + "mailFilter" => array( + 'acctDelFilter','acctGetFilters','acctSetFilters','acctSetFilters'), + "alternateAddresses" => array( + 'acctDelAlternateMailAddress','acctSetAlternateMailAddresses', + 'acctAddAlternateMailAddress','acctGetAlternateMailAddresses'), + "forwardingAddresses" => array( + 'acctAddMailForwardAddress','acctDelMailForwardAddress', + 'acctGetMailForwardAddresses','acctSetMailForwardAddresses'), + "vacationMessage" => array( + 'acctDelFilter','acctGetFilters','acctSetFilters','acctSetFilters'), + "mailBoxWarnLimit" => array( + 'acctSetQuota','acctGetQuota'), + "mailBoxSendSizelimit" => array( + 'acctSetQuota','acctGetQuota'), + "mailBoxHardSizelimit" => array( + 'acctSetQuota','acctGetQuota'), + "mailBoxAutomaticRemoval" => array( + 'acctSetQuota','acctGetQuota'), + "localDeliveryOnly" => array( + 'acctDelFilter','acctGetFilters','acctSetFilters','acctSetFilters'), + "dropOwnMails" => array( + 'acctDelFilter','acctGetFilters','acctSetFilters','acctSetFilters') + ); + + /* $featureReq = array( "primaryMail" => array( 'acctGetPrimaryMailAddress'), @@ -168,7 +202,7 @@ class groupware extends plugin 'acctDelFilter','acctGetFilters','acctSetFilters','acctSetFilters'), "dropOwnMails" => array( 'acctDelFilter','acctGetFilters','acctSetFilters','acctSetFilters')); - + */ // Check if all required methods cann be called! foreach($featureReq as $name => $requires){ $active = TRUE; @@ -708,10 +742,20 @@ class groupware extends plugin } /* - * Trying to save the primary Email Address. + *save the primary Email Address. */ if(!empty($this->mailAddress)){ - $this->groupwareDao->save("primaryMail", array($this->uid, $this->mailAddress)); + $this->groupwareDao->save("primaryMail", $this->uid, $this->mailAddress); + } + + /* + * + */ + if(isset($this->forwardingAddresses) && is_array($this->forwardingAddresses)){ + $this->groupwareDao->save("alternateAddresses", $this->uid, $this->alternateAddresses); + } + if(isset($this->forwardingAddresses) && is_array($this->forwardingAddresses)){ + $this->groupwareDao->save("forwardingAddresses", $this->uid, $this->forwardingAddresses); } } @@ -946,7 +990,7 @@ class groupware_dao{ } - public function save($feature, $valueArray) + public function save($feature, $uid, $valueArray) { /* * TODO: @@ -954,11 +998,12 @@ class groupware_dao{ * save and return the result. */ $function = groupware_dao::$gwFeatures[$feature]["save"]; + if(is_array($valueArray)){ - $valueArray = array_merge(array($function), $valueArray); + $valueArray = array_merge(array($function, $uid), $valueArray); } else{ - $valueArray = array($function, $valueArray); + $valueArray = array($function, $uid, $valueArray); } $this->debug("SAVING (feature, value)", $valueArray); $result = call_user_func_array(array($this->groupwarePluginRef, 'rpcExec'), $valueArray);