summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1045436)
raw | patch | inline | side by side (parent: 1045436)
author | hzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 22 Oct 2010 15:25:55 +0000 (15:25 +0000) | ||
committer | hzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 22 Oct 2010 15:25:55 +0000 (15:25 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20128 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 928b1e56a579e6526aa22f31c7e1d0856faf67ea..75b9aa82fdee830c97818057340da3daf3a3d6f9 100644 (file)
*/
function execute()
{
+ print_a($_POST);
// Register plugin execution
$display = plugin::execute();
// Get ui modifications and store them in the class.
$testAttrs = array("mailAddress","mailLocation","quotaUsage","quotaSize",
- "alternateAddresses","forwardingAddresses","vacationEnabled","vacationMessage");
+ "alternateAddresses","forwardingAddresses","vacationMessage");
foreach($testAttrs as $attr){
if(isset($_POST[$attr]) && $this->acl_is_writeable($attr)){
$this->$attr = get_post($attr);
}
}
+ if($this->acl_is_writeable('vacationMessage')){
+ $this->vacationEnabled = isset($_POST['vacationEnabled']);
+ }
// Get posted flag changes
$flagAttrs = array("localDeliveryOnly","dropOwnMails");
foreach($flagAttrs as $attr){
//checks for feature "mailFilter"
if($this->isFeatureEnabled("mailFilter") && $this->hasFeaturebeenChanged("mailFilter")){}
- //checks for feature "vacationMessage"
- if($this->isFeatureEnabled("vacationMessage") && $this->hasFeaturebeenChanged("vacationMessage")){}
-
//checks for feature "mailBoxAutomaticRemoval"
if($this->isFeatureEnabled("mailBoxAutomaticRemoval") && $this->hasFeaturebeenChanged("mailBoxAutomaticRemoval")){}
}
if($this->isFeatureEnabled("vacationMessage")&& $this->hasFeaturebeenChanged("vacationMessage")){
if($this->vacationEnabled){
+ //setting an message means that the OOOReply is switched off.
$this->groupwareDao->save("vacationMessage", $this->uid, $this->vacationMessage);
}
+ else{
+ //setting no message means that the OOOReply is switched off.
+ $this->groupwareDao->save("vacationMessage", $this->uid);
+ }
}
//checks for feature "quotaUsage"
//not to be saved
}
//checks for feature "vacationMessage"
- if ($this->isFeatureEnabled("vacationMessage")){
- if($this->vacationEnabled){
-
- }
- }
+ if ($this->isFeatureEnabled("vacationMessage")){}
//checks for feature "mailLimit" - integer
if ($this->isFeatureEnabled("mailLimit")){
if (!is_numeric($this->mailLimitReceiveValue)){
"alternateAddresses" => _("Alternate mail addresses"),
"forwardingAddresses" => _("Forwarding mail addresses"),
"vacationEnabled" => _("Vaction switch"),
- "vacationStart" => _("Vacation start time"),
- "vacationStop" => _("Vacation stop time"),
"vacationMessage" => _("Vacation message"),
"mailBoxWarnLimit" => _("Warn sizelimit"),
"mailBoxSendSizelimit" => _("Send sizelimit"),
"alternateAddresses" => "alternateAddresses",
"forwardingAddresses" => "forwardingAddresses",
"vacationEnabled" => "vacationEnabled",
- "vacationStart" => "vacationStart",
- "vacationStop" => "vacationStop",
"vacationMessage" => "vacationMessage",
"mailBoxWarnLimitEnabled" => "mailBoxWarnLimitEnabled",
"mailBoxWarnLimitValue" => "mailBoxWarnLimitValue",
diff --git a/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc b/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc
index 9205f68db15e3c684b5c91121f0a2773884187fd..5b6751be4bd056f83e89e38756514696a8eb2061 100644 (file)
//addding dummy
if($this->groupwarePluginRef->isFeatureEnabled("vacationMessage")){
-
- $vacMessage = $this->get("vacationMessage", array($uid));
+ $vacArray = $this->get("vacationMessage", array($uid));
+
+ $resultArr["vacationMessage"] = $vacArray["message"];
+ if(!empty($resultArr["vacationMessage"])){
+ $resultArr["vacationEnabled"] = true;
+ }
//$resultArr["vacationMessage"] = "dummy Vacation message - (getOutOfOfficeReply currently throws errors )";
}
return $resultArr;