*/
/**
- * The Autoloader allows us to omit "require/include" statements.
- */
-require_once 'Horde/Autoloader.php';
-
-/**
* The Horde_Kolab_Storage class provides the means to access the
* Kolab server storage for groupware objects.
*
}
/* Log the action on this item in the history log. */
- $history = &Horde_History::singleton();
+ try {
+ $history = &Horde_History::singleton();
- $history_id = $app . ':' . $this->_folder->getShareId() . ':' . $object_uid;
- $history->log($history_id, array('action' => $action, 'ts' => $mod_ts),
- true);
+ $history_id = $app . ':' . $this->_folder->getShareId() . ':' . $object_uid;
+ $history->log($history_id, array('action' => $action, 'ts' => $mod_ts),
+ true);
+ } catch (Horde_Exception $e) {
+ }
}
} else {
$driver = 'socket';
}
+
$this->_imap = Horde_Imap_Client::factory($driver, $params);
}
*/
public function getMailboxes()
{
- return $this->_imap->listMailboxes('', Horde_Imap_Client::MBOX_ALL, array('flat' => true));
+ return $this->_imap->listMailboxes('*', Horde_Imap_Client::MBOX_ALL, array('flat' => true));
}
/**
function getMessageHeader($mailbox, $uid, $peek_for_body = true)
{
$options = array('ids' => array($uid));
- $criteria = array(Horde_Imap_Client::FETCH_HEADERTEXT => array());
- $result = $this->_imap->fetch($mailbox, $criteria, $options);
- return $result['headertext'][$uid];
+ $criteria = array(
+ Horde_Imap_Client::FETCH_HEADERTEXT => array(
+ array(
+ )
+ )
+ );
+ $result = $this->_imap->fetch($mailbox, $criteria, $options);
+ return $result[$uid]['headertext'][0];
}
/**
function getMessageBody($mailbox, $uid)
{
$options = array('ids' => array($uid));
- $criteria = array(Horde_Imap_Client::FETCH_BODYTEXT => array());
+ $criteria = array(
+ Horde_Imap_Client::FETCH_BODYTEXT => array(
+ array(
+ )
+ )
+ );
$result = $this->_imap->fetch($mailbox, $criteria, $options);
- return $result['bodytext'][$uid];
+ return $result[$uid]['bodytext'][0];
}
/**
function getAnnotation($entry, $mailbox_name)
{
$result = $this->_imap->getMetadata($mailbox_name, $entry);
- return $result[$entry];
+ return $result[$mailbox_name][$entry];
}
/**
* The root of the Kolab annotation hierarchy, used on the various IMAP
* folder that are used by Kolab clients.
*/
- const ANNOT_ROOT = '/vendor/kolab/';
+ const ANNOT_ROOT = '/shared/vendor/kolab/';
/**
* The annotation, as defined by the Kolab format spec, that is used to store
* information about what groupware format the folder contains.
*/
- const ANNOT_FOLDER_TYPE = '/vendor/kolab/folder-type';
+ const ANNOT_FOLDER_TYPE = '/shared/vendor/kolab/folder-type';
/**
* Horde-specific annotations on the imap folder have this prefix.
*/
- const ANNOT_SHARE_ATTR = '/vendor/horde/share-';
+ const ANNOT_SHARE_ATTR = '/shared/vendor/horde/share-';
/**
* Kolab specific free/busy relevance
try {
$this->_connection->create($this->name);
$this->_connection->setAnnotation(self::ANNOT_FOLDER_TYPE,
- array('value.shared' => $this->_type),
+ $this->_type,
$this->name);
$this->trigger($this->name);
$this->_connection->delete($this->name);
if ($attribute == 'desc') {
$entry = '/comment';
} else {
- $entry = HORDE_ANNOT_SHARE_ATTR . $attribute;
+ $entry = self::ANNOT_SHARE_ATTR . $attribute;
}
$annotation = $this->_getAnnotation($entry, $this->name);
if (is_a($annotation, 'PEAR_Error')) {
}
}
- $session = &Horde_Kolab_Session::singleton();
+ $session = &Horde_Kolab_Session_Singleton::singleton();
// Update email headers
$new_headers->addHeader('From', $session->user_mail);
switch($type) {
case 'event':
- $session = &Horde_Kolab_Session::singleton();
+ $session = &Horde_Kolab_Session_Singleton::singleton();
$url = sprintf('%s/trigger/%s/%s.pfb',
$session->freebusy_server, $owner, $subpath);
break;