summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9035645)
raw | patch | inline | side by side (parent: 9035645)
author | hzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 22 Nov 2010 14:55:05 +0000 (14:55 +0000) | ||
committer | hzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 22 Nov 2010 14:55:05 +0000 (14:55 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20323 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/groupware/personal/groupware/class_Groupware.inc | patch | blob | history | |
gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc | patch | blob | history |
diff --git a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc
index f3078002ae8f0c818a1b63ec3d32a22c4d486a96..ebb823412c9f0b98c1bc5fe34af6ab8b2d4a1923 100644 (file)
// Save alternateAddresses
if($this->isFeatureEnabled("alternateAddresses")&& $this->hasFeaturebeenChanged("alternateAddresses")){
- if(!empty($this->alternateAddresses)
- && isset($this->alternateAddresses)
- && is_array($this->alternateAddresses)){
- $res = $this->groupwareDao->save("alternateAddresses", $this->uid, array($this->alternateAddresses));
+ if(isset($this->alternateAddresses) && is_array($this->alternateAddresses)){
+ if(!empty($this->alternateAddresses)){
+ $res = $this->groupwareDao->save("alternateAddresses", $this->uid, array($this->alternateAddresses));
+ }
+ else{
+ echo "deleting AltAddresses.";
+ $res = $this->groupwareDao->save("alternateAddresses", $this->uid, array(array()));
+ }
if($res === NULL){
$message = _("Saving alternate addresses failed!");
msg_dialog::display(_("Error"),$message."<br>".sprintf(_("Error was: '%s'."),$this->rpcErrorMessage),ERROR_DIALOG);
// Transform simple address array into, $addresses[address] = ForwardFlag;
$addresses = array();
- foreach($this->forwardingAddresses as $address) $addresses[$address] = TRUE;
-
- $res = $this->groupwareDao->save("forwardingAddresses", $this->uid, array($addresses));
+ if(!empty($this->forwardingAddresses)){
+ foreach($this->forwardingAddresses as $address) $addresses[$address] = TRUE;
+
+ $res = $this->groupwareDao->save("forwardingAddresses", $this->uid, array($addresses));
+ }
+ else{
+ $res = $this->groupwareDao->save("forwardingAddresses", $this->uid, array(array()));
+ }
+
if($res === NULL){
$message = _("Saving forward addresses failed!");
msg_dialog::display(_("Error"),$message."<br>".sprintf(_("Error was: '%s'."),$this->rpcErrorMessage),ERROR_DIALOG);
diff --git a/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc b/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc
index 3bebc00a62916ddbca8764bfda63940c99cb94a9..96588532455ac5cec8be1bb01cec1068f580b921 100644 (file)
$valueArray = array($function, $uid, $valueArray);
}
else{
+
//omit otherwise
$valueArray = array($function, $uid);
}
}
-
+ //TODO: Remove the debug output
+ //echo "----call_user_func_array:<pre>";
+ //var_dump($valueArray);
+ //echo "</pre>";
$result = call_user_func_array(array($this->groupwarePluginRef, 'rpcExec'), $valueArray);
return $result;
}