Add additional datastores

This commit is contained in:
Jörg Lehrke 2009-11-17 07:13:21 +00:00
parent 86d648a995
commit 4b490c2e8b
3 changed files with 15 additions and 6 deletions

View File

@ -106,8 +106,12 @@ class Horde_SyncML_Command_Get extends Horde_SyncML_Command {
array('text/plain' => '1.0'));
$this->_writeDataStore('./contacts', 'text/vcard', '3.0', $output,
array('text/x-vcard' => '2.1'));
$this->_writeDataStore('./card', 'text/vcard', '3.0', $output,
array('text/x-vcard' => '2.1'));
$this->_writeDataStore('./tasks', 'text/calendar', '2.0', $output,
array('text/x-vcalendar' => '1.0'));
$this->_writeDataStore('./jobs', 'text/calendar', '2.0', $output,
array('text/x-vcalendar' => '1.0'));
$this->_writeDataStore('./calendar', 'text/calendar', '2.0', $output,
array('text/x-vcalendar' => '1.0'));
$this->_writeDataStore('./events', 'text/calendar', '2.0', $output,

View File

@ -159,6 +159,7 @@ class Horde_SyncML_Command_Put extends Horde_SyncML_Command {
switch ($this->_sourceReference)
{
case 'contact':
case 'card':
if ($this->_contentType != "text/x-s4j-sifc")
{
error_log("forcing 'contact' content type to 'text/x-s4j-sifc' instead of '".$this->_contentType."'");

View File

@ -846,6 +846,7 @@ class Horde_SyncML_State {
$_type = str_replace('./','',$type);
switch (strtolower($_type)) {
case 'contacts':
case 'card':
return 'text/vcard';
break;
@ -856,6 +857,7 @@ class Horde_SyncML_State {
case 'calendar':
case 'events':
case 'tasks':
case 'jobs':
case 'caltasks':
return 'text/calendar';
break;
@ -892,6 +894,7 @@ class Horde_SyncML_State {
switch(strtolower($_type))
{
case 'contacts':
case 'card':
return 'contacts';
break;
@ -900,6 +903,7 @@ class Horde_SyncML_State {
break;
case 'tasks':
case 'jobs':
return 'tasks';
break;