From 7dc342e31794fef9e81260de66384973a4b8b3ad Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Fri, 29 Jul 2005 07:31:30 +0000 Subject: [PATCH] removed organizer as required field --- phpgwapi/inc/horde/Horde/SyncML.php | 10 ++++++++++ phpgwapi/inc/horde/Horde/iCalendar/vevent.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/horde/Horde/SyncML.php b/phpgwapi/inc/horde/Horde/SyncML.php index d454c43d4a..5083391bc3 100644 --- a/phpgwapi/inc/horde/Horde/SyncML.php +++ b/phpgwapi/inc/horde/Horde/SyncML.php @@ -427,6 +427,8 @@ class Horde_SyncML_SyncMLBody extends Horde_SyncML_ContentHandler { var $_actionCommands = false; + var $_clientSentFinal = false; + function startElement($uri, $element, $attrs) { parent::startElement($uri, $element, $attrs); @@ -536,6 +538,13 @@ class Horde_SyncML_SyncMLBody extends Horde_SyncML_ContentHandler { } Horde::logMessage('SyncML: summary:' . $s, __FILE__, __LINE__, PEAR_LOG_INFO); // session can be closed here! + #session_unset(); + #session_destroy(); + } + + if (!$this->_actionCommands && $state->getSyncStatus() == SERVER_SYNC_FINNISHED && $this->_clientSentFinal) { + Horde::logMessage('SyncML: destroying sync session '.session_id(), __FILE__, __LINE__, PEAR_LOG_INFO); + // session can be closed here! session_unset(); session_destroy(); } @@ -582,6 +591,7 @@ class Horde_SyncML_SyncMLBody extends Horde_SyncML_ContentHandler { { $state->setSyncStatus(CLIENT_SYNC_FINNISHED); } + $this->_clientSentFinal = true; Horde::logMessage('SyncML: Sync _syncTag = '. $state->getSyncStatus(), __FILE__, __LINE__, PEAR_LOG_INFO); break; default: diff --git a/phpgwapi/inc/horde/Horde/iCalendar/vevent.php b/phpgwapi/inc/horde/Horde/iCalendar/vevent.php index 39a5250a83..bf0bee75ec 100644 --- a/phpgwapi/inc/horde/Horde/iCalendar/vevent.php +++ b/phpgwapi/inc/horde/Horde/iCalendar/vevent.php @@ -31,7 +31,7 @@ class Horde_iCalendar_vevent extends Horde_iCalendar { // Default values. $requiredAttributes = array(); $requiredAttributes['DTSTAMP'] = time(); - $requiredAttributes['ORGANIZER'] = 'Unknown Organizer'; + #$requiredAttributes['ORGANIZER'] = 'Unknown Organizer'; $requiredAttributes['UID'] = $this->_exportDateTime(time()) . '@' . $_SERVER['SERVER_NAME']; $method = !empty($this->_container) ?