private function kolabWriteGlobalParam($gp)
 {
     if (!$gp) {
         return false;
     }
     $anno = $gp->serialize();
     if (function_exists("imap_setannotation")) {
         //write annotation on the INBOX folder
         $result = @imap_setannotation($this->_mbox, "INBOX", "/vendor/kolab/activesync", "value.priv", $anno);
         if (!$result) {
             $this->Log("write globalparam :" . @imap_last_error());
             return false;
         }
     }
     return true;
 }
Exemple #2
0
 /**
  * Sets the annotation on a folder.
  *
  * @param string $folder    The name of the folder.
  * @param string $annotation The annotation to set.
  * @param array  $value      The values to set
  *
  * @return NULL
  */
 public function setAnnotation($folder, $annotation, $value)
 {
     list($entry, $key) = $this->_getAnnotateMoreEntry($annotation);
     $result = imap_setannotation($this->getBackend(), $this->encodePath($folder), $entry, $key, $value);
     if (!$result) {
         throw new Horde_Kolab_Storage_Exception(sprintf(Horde_Kolab_Storage_Translation::t("Setting annotation %s[%s] on folder %s to %s failed.") . ' ' . Horde_Kolab_Storage_Translation::t("Error: %s"), $entry, $key, $this->_getBaseMbox() . $folder, $value, imap_last_error()));
     }
 }