private function kolabReadFolderParam($folder) { if (function_exists("imap_getannotation")) { $gp = new FolderParam(); $result = imap_getannotation($this->_mbox, $folder, "/vendor/kolab/activesync", "value.priv"); if (isset($result["value.priv"])) { if (!$gp->unserialize($result["value.priv"])) { return $gp; } } return $gp; } }
/** * Fetches the annotation from a folder. * * @param string $folder The name of the folder. * @param string $annotation The annotation to get. * * @return string The annotation value. */ public function getAnnotation($folder, $annotation) { list($entry, $key) = $this->_getAnnotateMoreEntry($annotation); $result = imap_getannotation($this->getBackend(), $this->encodePath($folder), $entry, $key); if (!$result) { throw new Horde_Kolab_Storage_Exception(sprintf(Horde_Kolab_Storage_Translation::t("Retrieving annotation %s[%s] on folder %s failed.") . ' ' . Horde_Kolab_Storage_Translation::t("Error: %s"), $entry, $key, $this->_getBaseMbox() . $folder, imap_last_error())); } return $result[$key]; }