Kronolith_Api::listUids() functionality changed slightly with this commit - it now
no longer returns events that represent exceptions, and only includes recurring events
once within the requested time period. It looks like the syncml code was the only code
currently calling this method, so there should be no issues with this change.
For the other apps, this only represents a method name change.
Bug: 9253
{
global $registry;
- $apimap = array('calendar' => 'listEvents',
- 'contacts' => 'listContacts',
- 'tasks' => 'listTasks',
- 'notes' => 'listNotes');
-
$adds = $mods = $dels = array();
$database = $this->_normalize($databaseURI);
$slowsync = $from_ts == 0;
}
$start = new Horde_Date($start);
$this->logMessage('Slow-syncing all events starting from ' . (string)$start, 'DEBUG');
- $data = $registry->{$database}->{$apimap[$database]}(
+ $data = $registry->{$database}->listUids(
SyncML_Backend::getParameter($databaseURI, 'source'), $start);
} else {
- $data = $registry->{$database}->{$apimap[$database]}(
+ $data = $registry->{$database}->listUids(
SyncML_Backend::getParameter($databaseURI, 'source'));
}
} else {
/**
* Returns the ids of all the events that happen within a time period.
+ * Only includes recurring events once per time period, and does not include
+ * events that represent exceptions, making this method useful for syncing
+ * purposes. For more control, use the listEvents method.
*
* @param string $calendar The calendar to check for events.
* @param object $startstamp The start of the time range.
}
$events = Kronolith::getDriver(null, $calendar)
- ->listEvents(new Horde_Date($startstamp), new Horde_Date($endstamp));
+ ->listEvents(new Horde_Date($startstamp),
+ new Horde_Date($endstamp),
+ false, // recurrence
+ false, // alarm
+ false, // no json cache
+ false, // Don't cover dates
+ true, // Hide exceptions
+ false); // No tags
$uids = array();
foreach ($events as $dayevents) {
foreach ($dayevents as $event) {
*
* @return array An array of UIDs for all notes the user can access.
*/
- public function listNotes($notepad = null)
+ public function listUids($notepad = null)
{
global $conf;
* @return array An array of UIDs for all tasks
* the user can access.
*/
- public function listTaskUids($tasklist = null)
+ public function listUids($tasklist = null)
{
if (!isset($GLOBALS['conf']['storage']['driver'])) {
return PEAR::raiseError(_("Not configured"));
* @return array An array of UIDs for all contacts the user can access.
* @throws Turba_Exception
*/
- public function listContacts($sources = null)
+ public function listUids($sources = null)
{
global $cfgSources, $prefs;