Index: Share/kolab.php =================================================================== --- Share/kolab.php (Revision 1688) +++ Share/kolab.php (Arbeitskopie) @@ -687,7 +687,8 @@ if (substr($this->_folder, 0, 6) == 'INBOX/') { $new_folder = 'INBOX/' . $name; - $result = $this->_storage->getImap()->mailboxExist($new_folder); + $imap = $this->_storage->getImap(); + $result = $imap->mailboxExist($new_folder); if (is_a($result, 'PEAR_Error')) { return PEAR::raiseError(sprintf(_("Horde/Share/kolab: Checking for mailbox %s existance failed with: %s"), $new_folder, $result->message)); } @@ -695,7 +696,8 @@ return PEAR::raiseError(sprintf(_("Horde/Share/kolab: Unable to rename %s to %s: destination folder already exists"), $this->_folder, $new_folder)); } - $result = $this->_storage->getImap()->renameMailbox($this->_folder, $new_folder); + $imap = $this->_storage->getImap(); + $result = $imap->renameMailbox($this->_folder, $new_folder); if (is_a($result, 'PEAR_Error')) { return PEAR::raiseError(sprintf(_("Horde/Share/kolab: Renaming mailbox %s to %s failed with: %s"), $this->_folder, $new_folder, $result->message)); } @@ -719,7 +721,8 @@ if (isset($this->data['default'])) { return $this->data['default']; } - $annotation = $this->_storage->getImap()->getAnnotation(KOLAB_ANNOT_FOLDER_TYPE, 'value.shared', $this->getName()); + $imap = $this->_storage->getImap(); + $annotation = $imap->getAnnotation(KOLAB_ANNOT_FOLDER_TYPE, 'value.shared', $this->getName()); if (is_a($annotation, 'PEAR_Error')) { return false; } @@ -779,7 +782,8 @@ break; default: // Unkown attribute - $annotation = $this->_storage->getImap()->getAnnotation(KOLAB_ANNOT_SHARE_ATTR . $attribute, 'value.shared', $this->_folder); + $imap = $this->_storage->getImap(); + $annotation = $imap->getAnnotation(KOLAB_ANNOT_SHARE_ATTR . $attribute, 'value.shared', $this->_folder); if (is_a($annotation, 'PEAR_Error') || empty($annotation)) { $annotation = ''; } @@ -828,7 +832,8 @@ continue; } - $result = $this->_storage->getImap()->setAnnotation(KOLAB_ANNOT_SHARE_ATTR . $attribute, array('value.shared' => $value), $this->_folder); + $imap = $this->_storage->getImap(); + $result = $imap->setAnnotation(KOLAB_ANNOT_SHARE_ATTR . $attribute, array('value.shared' => $value), $this->_folder); if (is_a($result, 'PEAR_Error')) { return PEAR::raiseError(sprintf(_("Horde/Share/kolab: Unable to save annotation on %s. Error was: %s"), $this->_folder, $result->message)); }