$result = Kronolith::getDriver()->removeUserData($user);
/* Now delete history as well. */
- $history = &Horde_History::singleton();
+ $history = Horde_History::singleton();
if (method_exists($history, 'removeByParent')) {
$histories = $history->removeByParent('kronolith:' . $user);
} else {
if (!is_a($existing_event, 'PEAR_Error')) {
// Check if our event is newer then the existing - get the
// event's history.
- $history = &Horde_History::singleton();
+ $history = Horde_History::singleton();
$created = $modified = null;
$log = $history->getHistory('kronolith:' . $calendar . ':'
. $uid);
}
if (!array_key_exists($calendar,
Kronolith::listCalendars(false, PERMS_READ))) {
- return PEAR::raiseError(_("Permission Denied"));
- }
+ return PEAR::raiseError(_("Permission Denied"));
+ }
$driver = Kronolith::getDriver(null, $calendar);
if (is_a($driver, 'PEAR_Error')) {
if (!array_key_exists($calendar,
Kronolith::listCalendars(false, PERMS_READ))) {
- return PEAR::raiseError(_("Permission Denied"));
- }
+ return PEAR::raiseError(_("Permission Denied"));
+ }
- $history = &Horde_History::singleton();
+ $history = Horde_History::singleton();
$histories = $history->getByTimestamp('>', $timestamp, array(array('op' => '=', 'field' => 'action', 'value' => $action)), 'kronolith:' . $calendar);
if (is_a($histories, 'PEAR_Error')) {
return $histories;
if (!array_key_exists($calendar,
Kronolith::listCalendars(false, PERMS_READ))) {
- return PEAR::raiseError(_("Permission Denied"));
- }
+ return PEAR::raiseError(_("Permission Denied"));
+ }
- $history = &Horde_History::singleton();
+ $history = Horde_History::singleton();
return $history->getActionTimestamp('kronolith:' . $calendar . ':' .
$uid, $action);
}
}
if (!array_key_exists($calendar,
Kronolith::listCalendars(false, PERMS_EDIT))) {
- return PEAR::raiseError(_("Permission Denied"));
- }
+ return PEAR::raiseError(_("Permission Denied"));
+ }
switch ($contentType) {
case 'text/calendar':
case 'text/x-vcalendar':
$version = '1.0';
case 'text/calendar':
- $share = &$kronolith_shares->getShare($event->getCalendar());
+ $share = $kronolith_shares->getShare($event->getCalendar());
$iCal = new Horde_iCalendar($version);
$iCal->setAttribute('X-WR-CALNAME', Horde_String::convertCharset($share->get('name'), Horde_Nls::getCharset(), 'utf-8'));
// Create a new vEvent.
- $vEvent = &$event->toiCalendar($iCal);
+ $vEvent = $event->toiCalendar($iCal);
$iCal->addComponent($vEvent);
return $iCal->exportvCalendar();
if (!array_key_exists($calendar,
Kronolith::listCalendars(false, PERMS_READ))) {
- return PEAR::raiseError(_("Permission Denied"));
- }
+ return PEAR::raiseError(_("Permission Denied"));
+ }
$kronolith_driver = Kronolith::getDriver(null, $calendar);
$events = $kronolith_driver->listEvents();
case 'text/x-vcalendar':
$version = '1.0';
case 'text/calendar':
- $share = &$kronolith_shares->getShare($calendar);
+ $share = $kronolith_shares->getShare($calendar);
$iCal = new Horde_iCalendar($version);
$iCal->setAttribute('X-WR-CALNAME', Horde_String::convertCharset($share->get('name'), Horde_Nls::getCharset(), 'utf-8'));
foreach ($events as $dayevents) {
foreach ($dayevents as $event) {
- $vEvent = &$event->toiCalendar($iCal);
+ $vEvent = $event->toiCalendar($iCal);
$iCal->addComponent($vEvent);
}
}
if (!$event->hasPermission(PERMS_EDIT) ||
($event->isPrivate() && $event->getCreatorId() != Horde_Auth::getAuth())) {
- return PEAR::raiseError(_("Permission Denied"));
- }
+ return PEAR::raiseError(_("Permission Denied"));
+ }
if (is_a($content, 'Horde_iCalendar_vevent')) {
$component = $content;
if (empty($event) ||
($event->isPrivate() && $event->getCreatorId() != Horde_Auth::getAuth())) {
- return PEAR::raiseError(_("Permission Denied"));
- }
+ return PEAR::raiseError(_("Permission Denied"));
+ }
$atnames = $response->getAttribute('ATTENDEE');
if (!is_array($atnames)) {
return PEAR::raiseError(_("Permission Denied"));
}
- $group = &Group::singleton();
+ $group = Group::singleton();
$alarm_list = array();
$time = new Horde_Date($time);
$calendars = is_null($user) ? array_keys($GLOBALS['kronolith_shares']->listAllShares()) : $GLOBALS['display_calendars'];
foreach ($cal_alarms as $event) {
foreach ($users as $alarm_user) {
if ($alarm_user == $current_user) {
- $prefs = &$GLOBALS['prefs'];
+ $prefs = $GLOBALS['prefs'];
} else {
- $prefs = &Prefs::singleton($GLOBALS['conf']['prefs']['driver'],
+ $prefs = Prefs::singleton($GLOBALS['conf']['prefs']['driver'],
'kronolith', $alarm_user, null,
null, false);
}
if (!array_key_exists($calendar,
Kronolith::listCalendars(false, PERMS_EDIT))) {
- return PEAR::raiseError(_("Permission Denied"));
- }
- $share = &$GLOBALS['kronolith_shares']->getShare($calendar);
+ return PEAR::raiseError(_("Permission Denied"));
+ }
+ $share = $GLOBALS['kronolith_shares']->getShare($calendar);
return $share->lock($calendar, $event);
}
if (!array_key_exists($calendar,
Kronolith::listCalendars(false, PERMS_EDIT))) {
- return PEAR::raiseError(_("Permission Denied"));
- }
- $share = &$GLOBALS['kronolith_shares']->getShare($calendar);
+ return PEAR::raiseError(_("Permission Denied"));
+ }
+ $share = $GLOBALS['kronolith_shares']->getShare($calendar);
return $share->unlock($lockid);
}
if (!array_key_exists($calendar,
Kronolith::listCalendars(false, PERMS_READ))) {
- return PEAR::raiseError(_("Permission Denied"));
- }
- $share = &$GLOBALS['kronolith_shares']->getShare($calendar);
+ return PEAR::raiseError(_("Permission Denied"));
+ }
+ $share = $GLOBALS['kronolith_shares']->getShare($calendar);
return $share->checkLocks($event);
}