diff options
Diffstat (limited to 'dev-php/horde-framework-kolab/files/HK-GW-Fix_annotation_use-3.2_ALPHA.patch')
-rw-r--r-- | dev-php/horde-framework-kolab/files/HK-GW-Fix_annotation_use-3.2_ALPHA.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/dev-php/horde-framework-kolab/files/HK-GW-Fix_annotation_use-3.2_ALPHA.patch b/dev-php/horde-framework-kolab/files/HK-GW-Fix_annotation_use-3.2_ALPHA.patch new file mode 100644 index 0000000..f4d66a2 --- /dev/null +++ b/dev-php/horde-framework-kolab/files/HK-GW-Fix_annotation_use-3.2_ALPHA.patch @@ -0,0 +1,57 @@ +Move to better IMAP annotation entries. + +diff -r 47e8cc47adcf framework/Kolab/Kolab/IMAP.php +--- a/framework/Kolab/Kolab/IMAP.php Wed Oct 03 19:30:01 2007 +0200 ++++ b/framework/Kolab/Kolab/IMAP.php Wed Oct 03 19:33:53 2007 +0200 +@@ -31,6 +31,11 @@ require_once 'Horde/MIME/Structure.php'; + * that are used by Kolab clients. + */ + define('KOLAB_ANNOT_ROOT', '/vendor/kolab/'); ++ ++/** ++ * The root of the Horde annotation hierarchy on the IMAP server ++ */ ++define('HORDE_ANNOT_ROOT', '/vendor/horde/'); + + /** + * The annotation, as defined by the Kolab format spec, that is used to store +diff -r 47e8cc47adcf framework/Share/Share/kolab.php +--- a/framework/Share/Share/kolab.php Wed Oct 03 19:30:01 2007 +0200 ++++ b/framework/Share/Share/kolab.php Wed Oct 03 19:33:53 2007 +0200 +@@ -11,7 +11,7 @@ require_once 'Horde/Kolab.php'; + /** + * Horde-specific annotations on the imap folder have this prefix. + */ +-define('KOLAB_ANNOT_SHARE_ATTR', KOLAB_ANNOT_ROOT . 'h-share-attr-'); ++define('HORDE_ANNOT_SHARE_ATTR', HORDE_ANNOT_ROOT . 'share-'); + + /** + * Marks a share without a name. These shares are still invalid +@@ -1000,7 +1000,12 @@ class ImapObject_Share { + function getAttribute($attribute) + { + $imap = &$this->_storage->getImap(); +- $annotation = $imap->getAnnotation(KOLAB_ANNOT_SHARE_ATTR . $attribute, 'value.shared', $this->_folder); ++ if ($attribute == 'desc') { ++ $entry = '/comment'; ++ } else { ++ $entry = HORDE_ANNOT_SHARE_ATTR . $attribute; ++ } ++ $annotation = $imap->getAnnotation($entry, 'value.shared', $this->_folder); + if (is_a($annotation, 'PEAR_Error') || empty($annotation)) { + $annotation = ''; + } +@@ -1170,7 +1175,12 @@ class ImapObject_Share { + $imap = &$this->_storage->getImap(); + // setAnnotation apparently does not suppoort UTF-8 nor any special characters + $store = base64_encode($value); +- $result = $imap->setAnnotation(KOLAB_ANNOT_SHARE_ATTR . $attribute, array('value.shared' => $store), $this->_folder); ++ if ($attribute == 'desc') { ++ $entry = '/comment'; ++ } else { ++ $entry = HORDE_ANNOT_SHARE_ATTR . $attribute; ++ } ++ $result = $imap->setAnnotation($entry, array('value.shared' => $store), $this->_folder); + if (is_a($result, 'PEAR_Error')) { + return $result; + } |