Skip to content

Commit

Permalink
Filter out inactive applications when polling for ActiveSync.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Feb 17, 2016
1 parent a03bfff commit e06cbfb
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions framework/Core/lib/Horde/Core/ActiveSync/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -741,18 +741,24 @@ public function notes_getActionTimestamp($uid, $action, $notepad = null)
*/
public function horde_listApis()
{
$apps = $this->_registry->horde->listAPIs();
$apis = $this->_registry->horde->listAPIs();

// Note support not added until 5.1. Need to check the feature.
// @TODO: H6, add this check to all apps. BC break to check it now,
// since we didn't have this feature earlier.
if ($key = array_search('notes', $apps)) {
if ($key = array_search('notes', $apis)) {
if (!$this->hasFeature('activesync', 'notes')) {
unset($apps[$key]);
unset($apis[$key]);
}
}

return $apps;
$inactive = $this->_registry->listApps(array('inactive'));
$active_apis = array();
foreach ($apis as $api) {
if (!$this->_registry->isInactive($this->_registry->hasInterface($api))) {
$active_apis[] = $api;
}
}
return $active_apis;
}

/**
Expand Down

0 comments on commit e06cbfb

Please sign in to comment.