Skip to content
Browse files

Just disable the vacation message if we know that's what we are doing.

  • Loading branch information...
1 parent 6a32184 commit 16925cf5352645a6e0431b85ce19b609855713fe @mrubinsk mrubinsk committed Apr 4, 2012
Showing with 13 additions and 10 deletions.
  1. +13 −10 framework/Core/lib/Horde/Core/ActiveSync/Connector.php
View
23 framework/Core/lib/Horde/Core/ActiveSync/Connector.php
@@ -394,18 +394,21 @@ public function filters_getVacation()
*/
public function filters_setVacation(array $setting)
{
- // Only support a single message, the APPLIESTOINTERNAL message.
- foreach ($setting['oofmsgs'] as $msg) {
- if ($msg['appliesto'] == Horde_ActiveSync_Request_Settings::SETTINGS_APPLIESTOINTERNAL) {
- $vacation = array(
- 'reason' => $msg['replymessage'],
- 'subject' => Horde_Core_Translation::t('Out Of Office')
- );
- $this->_registry->filter->setVacation($vacation, $setting['oofstate'] == 1);
- return;
+ if ($setting['oofstate'] == Horde_ActiveSync_Request_Settings::OOF_STATE_ENABLED) {
+ // Only support a single message, the APPLIESTOINTERNAL message.
+ foreach ($setting['oofmsgs'] as $msg) {
+ if ($msg['appliesto'] == Horde_ActiveSync_Request_Settings::SETTINGS_APPLIESTOINTERNAL) {
+ $vacation = array(
+ 'reason' => $msg['replymessage'],
+ 'subject' => Horde_Core_Translation::t('Out Of Office')
+ );
+ $this->_registry->filter->setVacation($vacation);
+ return;
+ }
}
+ } else {
+ $this->_registry->filter->disableVacation();
}
-
}
/**

0 comments on commit 16925cf

Please sign in to comment.
Something went wrong with that request. Please try again.