From 00290a603237e719cc4ec3db65e6661ba7d46a51 Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Tue, 09 Nov 2010 02:54:34 -0500 Subject: [PATCH] - Add support for shared folders (#1403507) --- program/include/rcube_imap_generic.php | 69 +--------------------------------- 1 files changed, 3 insertions(+), 66 deletions(-) diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php index 0cb9f24..6de27e8 100644 --- a/program/include/rcube_imap_generic.php +++ b/program/include/rcube_imap_generic.php @@ -549,53 +549,14 @@ } /** - * Gets the root directory and delimiter (of personal namespace) + * Gets the delimiter * - * @return mixed A root directory name, or false. - */ - function getRootDir() - { - if (isset($this->prefs['rootdir']) && is_string($this->prefs['rootdir'])) { - return $this->prefs['rootdir']; - } - - if (!is_array($data = $this->getNamespace())) { - return false; - } - - $user_space_data = $data['personal']; - if (!is_array($user_space_data)) { - return false; - } - - $first_userspace = $user_space_data[0]; - if (count($first_userspace) !=2) { - return false; - } - - $rootdir = $first_userspace[0]; - $this->prefs['delimiter'] = $first_userspace[1]; - $this->prefs['rootdir'] = $rootdir ? substr($rootdir, 0, -1) : ''; - - return $this->prefs['rootdir']; - } - - /** - * Gets the delimiter, for example: - * INBOX.foo -> . - * INBOX/foo -> / - * INBOX\foo -> \ - * - * @return mixed A delimiter (string), or false. - * @see connect() + * @return string The delimiter */ function getHierarchyDelimiter() { if ($this->prefs['delimiter']) { return $this->prefs['delimiter']; - } - if (!empty($this->prefs['delimiter'])) { - return $this->prefs['delimiter']; } // try (LIST "" ""), should return delimiter (RFC2060 Sec 6.3.8) @@ -611,26 +572,7 @@ } } - // if that fails, try namespace extension - // try to fetch namespace data - if (!is_array($data = $this->getNamespace())) { - return false; - } - - // extract user space data (opposed to global/shared space) - $user_space_data = $data['personal']; - if (!is_array($user_space_data)) { - return false; - } - - // get first element - $first_userspace = $user_space_data[0]; - if (!is_array($first_userspace)) { - return false; - } - - // extract delimiter - return $this->prefs['delimiter'] = $first_userspace[1]; + return NULL; } /** @@ -830,7 +772,6 @@ if ($this->prefs['force_caps']) { $this->clearCapability(); } - $this->getRootDir(); $this->logged = true; return true; @@ -1941,10 +1882,6 @@ { if (empty($mailbox)) { $mailbox = '*'; - } - - if (empty($ref) && $this->prefs['rootdir']) { - $ref = $this->prefs['rootdir']; } $args = array(); -- Gitblit v1.9.1