Skip to content

Commit

Permalink
Fix setting the oofstate property.
Browse files Browse the repository at this point in the history
This is used to indicate availability of the *feature* not
the status of the message.
  • Loading branch information
mrubinsk committed Nov 24, 2017
1 parent 0d60315 commit e8ecdb9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/Horde/Core/ActiveSync/Driver.php
Expand Up @@ -2453,13 +2453,16 @@ public function getSettings(array $settings, $device)
switch ($key) {
case 'oof':
if (!$vacation = $this->_connector->filters_getVacation()) {
return array('oof' => array('status' => Horde_ActiveSync_Request_Settings::STATUS_UNAVAILABLE));
$res['oof'] = array(
'status' => Horde_ActiveSync_Request_Settings::STATUS_SUCCESS,
'oofstate' => Horde_ActiveSync_Request_Settings::OOF_STATE_DISABLED,
'oofmsgs' => array()
);
break;
}
$res['oof'] = array(
'status' => Horde_ActiveSync_Request_Settings::STATUS_SUCCESS,
'oofstate' => ($vacation['disabled']
? Horde_ActiveSync_Request_Settings::OOF_STATE_DISABLED
: Horde_ActiveSync_Request_Settings::OOF_STATE_ENABLED),
'oofstate' => Horde_ActiveSync_Request_Settings::OOF_STATE_ENABLED,
'oofmsgs' => array()
);
// If we have start/end it's a timebased vacation in EAS-speak.
Expand Down

0 comments on commit e8ecdb9

Please sign in to comment.