From b50b38c1449905a0455120a86d954990612406d9 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 27 Feb 2009 11:30:17 -0700 Subject: [PATCH] Some Horde 5 fixes/style. --- imp/acl.php | 2 +- imp/ajax.php | 16 ++++++------ imp/compose-dimp.php | 2 +- imp/folders-mimp.php | 8 +++--- imp/folders.php | 4 +-- imp/lib/Block/Foldersummary.php | 2 +- imp/lib/Block/summary.php | 2 +- imp/lib/Block/tree_folders.php | 6 ++--- imp/lib/DIMP.php | 46 ++++++++++++++++++---------------- imp/lib/Folder.php | 20 +++++++-------- imp/lib/{IMAP.php => Imap.php} | 4 +-- imp/lib/{IMAP/ACL.php => Imap/Acl.php} | 8 +++--- imp/lib/{IMAP => Imap}/Thread.php | 6 ++--- imp/lib/{IMAP => Imap}/Tree.php | 41 +++++++++++++++++------------- imp/lib/Search.php | 10 ++++---- imp/lib/Views/ListMessages.php | 6 ++--- imp/lib/api.php | 4 +-- imp/lib/base.php | 4 +-- imp/lib/prefs.php | 2 +- imp/mailbox.php | 2 +- imp/thread.php | 2 +- 21 files changed, 103 insertions(+), 94 deletions(-) rename imp/lib/{IMAP.php => Imap.php} (99%) rename imp/lib/{IMAP/ACL.php => Imap/Acl.php} (97%) rename imp/lib/{IMAP => Imap}/Thread.php (96%) rename imp/lib/{IMAP => Imap}/Tree.php (98%) diff --git a/imp/acl.php b/imp/acl.php index c6ce06ace..299d94bbb 100644 --- a/imp/acl.php +++ b/imp/acl.php @@ -23,7 +23,7 @@ if ($prefs->isLocked('acl') || empty($_SESSION['imp']['acl'])) { } try { - $ACLDriver = &IMP_IMAP_ACL::singleton(); + $ACLDriver = &IMP_Imap_Acl::singleton(); } catch (Horde_Exception $e) { $notification->push($error, _("This server does not support sharing folders.")); header('Location: ' . $prefs_url); diff --git a/imp/ajax.php b/imp/ajax.php index 9fb6fb59a..9c4b8857e 100644 --- a/imp/ajax.php +++ b/imp/ajax.php @@ -119,7 +119,7 @@ function _getIdxString($indices) function _getPollInformation($mbox) { - $imptree = IMP_IMAP_Tree::singleton(); + $imptree = IMP_Imap_Tree::singleton(); $elt = $imptree->get($mbox); if ($imptree->isPolled($elt)) { $info = $imptree->getElementInfo($mbox); @@ -190,7 +190,7 @@ case 'CreateFolder': break; } - $imptree = IMP_IMAP_Tree::singleton(); + $imptree = IMP_Imap_Tree::singleton(); $imptree->eltDiffStart(); $imp_folder = IMP_Folder::singleton(); @@ -213,7 +213,7 @@ case 'DeleteFolder': break; } - $imptree = IMP_IMAP_Tree::singleton(); + $imptree = IMP_Imap_Tree::singleton(); $imptree->eltDiffStart(); $imp_folder = IMP_Folder::singleton(); @@ -231,7 +231,7 @@ case 'RenameFolder': break; } - $imptree = IMP_IMAP_Tree::singleton(); + $imptree = IMP_Imap_Tree::singleton(); $imptree->eltDiffStart(); $imp_folder = IMP_Folder::singleton(); @@ -285,8 +285,8 @@ case 'MarkFolderUnseen': break; case 'ListFolders': - $imptree = IMP_IMAP_Tree::singleton(); - $result = DIMP::getFolderResponse($imptree, array('a' => $imptree->folderList(IMP_IMAP_TREE::FLIST_CONTAINER | IMP_IMAP_TREE::FLIST_VFOLDER), 'c' => array(), 'd' => array())); + $imptree = IMP_Imap_Tree::singleton(); + $result = DIMP::getFolderResponse($imptree, array('a' => $imptree->folderList(IMP_Imap_Tree::FLIST_CONTAINER | IMP_Imap_Tree::FLIST_VFOLDER), 'c' => array(), 'd' => array())); $quota = _getQuota(); if (!is_null($quota)) { @@ -297,7 +297,7 @@ case 'ListFolders': case 'PollFolders': $result = new stdClass; - $imptree = IMP_IMAP_Tree::singleton(); + $imptree = IMP_Imap_Tree::singleton(); $result->poll = array(); foreach ($imptree->getPollList(true) as $val) { @@ -653,7 +653,7 @@ case 'ModifyPollFolder': $add = Util::getPost('add'); - $imptree = IMP_IMAP_Tree::singleton(); + $imptree = IMP_Imap_Tree::singleton(); $result = new stdClass; $result->add = (bool) $add; diff --git a/imp/compose-dimp.php b/imp/compose-dimp.php index ab26c9761..80e971ac3 100644 --- a/imp/compose-dimp.php +++ b/imp/compose-dimp.php @@ -138,7 +138,7 @@ if (count($_POST)) { /* Use IMP_Tree to determine whether the sent mail folder was * created. */ - $imptree = &IMP_IMAP_Tree::singleton(); + $imptree = &IMP_Imap_Tree::singleton(); $imptree->eltDiffStart(); $options = array( diff --git a/imp/folders-mimp.php b/imp/folders-mimp.php index 6ee44e62b..d1366d204 100644 --- a/imp/folders-mimp.php +++ b/imp/folders-mimp.php @@ -29,16 +29,16 @@ if (empty($conf['user']['allow_folders'])) { $subscribe = $prefs->getValue('subscribe'); $showAll = (!$subscribe || $_SESSION['imp']['showunsub']); -/* Initialize the IMP_IMAP_Tree object. */ -$imptree = &IMP_IMAP_Tree::singleton(); -$mask = IMP_IMAP_TREE::NEXT_SHOWCLOSED; +/* Initialize the IMP_Imap_Tree object. */ +$imptree = &IMP_Imap_Tree::singleton(); +$mask = IMP_Imap_Tree::NEXT_SHOWCLOSED; /* Toggle subscribed view, if necessary. */ if ($subscribe && Util::getFormData('ts')) { $showAll = !$showAll; $_SESSION['imp']['showunsub'] = $showAll; $imptree->showUnsubscribed($showAll); - $mask |= IMP_IMAP_TREE::NEXT_SHOWSUB; + $mask |= IMP_Imap_Tree::NEXT_SHOWSUB; } /* Start iterating through the list of mailboxes, displaying them. */ diff --git a/imp/folders.php b/imp/folders.php index 7222e9925..70a41fd4b 100644 --- a/imp/folders.php +++ b/imp/folders.php @@ -56,8 +56,8 @@ $folders_url = Horde::selfUrl(); /* Initialize the IMP_Folder object. */ $imp_folder = &IMP_Folder::singleton(); -/* Initialize the IMP_IMAP_Tree object. */ -$imaptree = &IMP_IMAP_Tree::singleton(); +/* Initialize the IMP_Imap_Tree object. */ +$imaptree = &IMP_Imap_Tree::singleton(); /* $folder_list is already encoded in UTF7-IMAP. */ $charset = NLS::getCharset(); diff --git a/imp/lib/Block/Foldersummary.php b/imp/lib/Block/Foldersummary.php index 123c8c3c1..0cbe79baa 100644 --- a/imp/lib/Block/Foldersummary.php +++ b/imp/lib/Block/Foldersummary.php @@ -25,7 +25,7 @@ class IMP_Block_Foldersummary extends Horde_Block } /* Get list of mailboxes to poll. */ - $imptree = &IMP_IMAP_Tree::singleton(); + $imptree = &IMP_Imap_Tree::singleton(); $folders = $imptree->getPollList(true, true); $anyUnseen = false; diff --git a/imp/lib/Block/summary.php b/imp/lib/Block/summary.php index d66c645c6..861fb3df3 100644 --- a/imp/lib/Block/summary.php +++ b/imp/lib/Block/summary.php @@ -55,7 +55,7 @@ class Horde_Block_imp_summary extends Horde_Block } /* Get list of mailboxes to poll. */ - $imaptree = &IMP_IMAP_Tree::singleton(); + $imaptree = &IMP_Imap_Tree::singleton(); $folders = $imaptree->getPollList(true, true); /* Quota info, if available. */ diff --git a/imp/lib/Block/tree_folders.php b/imp/lib/Block/tree_folders.php index 1c31e68bb..eab354554 100644 --- a/imp/lib/Block/tree_folders.php +++ b/imp/lib/Block/tree_folders.php @@ -55,10 +55,10 @@ class Horde_Block_imp_tree_folders extends Horde_Block $name_url = Util::addParameter(Horde::applicationUrl('mailbox.php'), 'no_newmail_popup', 1); /* Initialize the IMP_Tree object. */ - $imaptree = &IMP_IMAP_Tree::singleton(); - $mask = IMP_IMAP_Tree::NEXT_SHOWCLOSED; + $imaptree = &IMP_Imap_Tree::singleton(); + $mask = IMP_Imap_Tree::NEXT_SHOWCLOSED; if ($GLOBALS['prefs']->getValue('subscribe')) { - $mask |= IMP_IMAP_Tree::NEXT_SHOWSUB; + $mask |= IMP_Imap_Tree::NEXT_SHOWSUB; } $unseen = 0; diff --git a/imp/lib/DIMP.php b/imp/lib/DIMP.php index a6e23365e..4ae929f86 100644 --- a/imp/lib/DIMP.php +++ b/imp/lib/DIMP.php @@ -13,6 +13,11 @@ class DIMP { /** + * Charset cache. + */ + static protected $_charset; + + /** * Output a dimp-style action (menubar) link. * * @param array $params A list of parameters. @@ -27,17 +32,16 @@ class DIMP * * @return string An HTML link to $url. */ - public function actionButton($params = array()) + static public function actionButton($params = array()) { $tooltip = (empty($params['tooltip'])) ? '' : $params['tooltip']; if (empty($params['title'])) { - static $charset; - if (!isset($charset)) { - $charset = NLS::getCharset(); + if (!isset(self::$_charset)) { + self::$_charset = NLS::getCharset(); } $old_error = error_reporting(0); - $tooltip = nl2br(htmlspecialchars($tooltip, ENT_QUOTES, $charset)); + $tooltip = nl2br(htmlspecialchars($tooltip, ENT_QUOTES, self::$_charset)); $title = $ak = ''; } else { $title = $params['title']; @@ -63,7 +67,7 @@ class DIMP * Each entry contains the three elements necessary * for a Horde::addScriptFile() call. */ - public function header($title, $scripts = array()) + static public function header($title, $scripts = array()) { // Don't autoload any javascript files. Horde::disableAutoloadHordeJS(); @@ -121,7 +125,7 @@ class DIMP * * @return string TODO */ - protected function _includeDIMPJSVars() + static protected function _includeDIMPJSVars() { global $browser, $conf, $prefs, $registry; @@ -269,7 +273,7 @@ class DIMP /** * Return an appended IMP folder string */ - private function _appendedFolderPref($folder) + static private function _appendedFolderPref($folder) { return IMP::folderPref($folder, true); } @@ -279,7 +283,7 @@ class DIMP * * @return string The notification JS code. */ - public function notify() + static public function notify() { $GLOBALS['notification']->notify(array('listeners' => 'status')); $msgs = $GLOBALS['imp_notify']->getStack(true); @@ -304,9 +308,9 @@ class DIMP * * @return array The object used by the JS code to update the folder tree. */ - public function getFolderResponse($imptree, $changes = null) + static public function getFolderResponse($imptree, $changes = null) { - if ($changes === null) { + if (is_null($changes)) { $changes = $imptree->eltDiff(); } if (empty($changes)) { @@ -327,7 +331,7 @@ class DIMP foreach ($changes['c'] as $val) { // Skip the base element, since any change there won't ever be // updated on-screen. - if ($val != IMP_IMAP_TREE::BASE_ELT) { + if ($val != IMP_Imap_Tree::BASE_ELT) { $result['c'][] = DIMP::_createFolderElt($imptree->element($val)); } } @@ -362,7 +366,7 @@ class DIMP * 'v' (virtual) = Is this a virtual folder? [boolean] [DEFAULT: no] * */ - private function _createFolderElt($elt) + static private function _createFolderElt($elt) { $ob = new stdClass; if ($elt['children']) { @@ -387,27 +391,27 @@ class DIMP } switch ($elt['special']) { - case IMP_IMAP_TREE::SPECIAL_INBOX: + case IMP_Imap_Tree::SPECIAL_INBOX: $ob->cl = 'inbox'; $ob->s = 1; break; - case IMP_IMAP_TREE::SPECIAL_TRASH: + case IMP_Imap_Tree::SPECIAL_TRASH: $ob->cl = 'trash'; $ob->s = 1; break; - case IMP_IMAP_TREE::SPECIAL_SPAM: + case IMP_Imap_Tree::SPECIAL_SPAM: $ob->cl = 'spam'; $ob->s = 1; break; - case IMP_IMAP_TREE::SPECIAL_DRAFT: + case IMP_Imap_Tree::SPECIAL_DRAFT: $ob->cl = 'drafts'; $ob->s = 1; break; - case IMP_IMAP_TREE::SPECIAL_SENT: + case IMP_Imap_Tree::SPECIAL_SENT: $ob->cl = 'sent'; $ob->s = 1; break; @@ -452,7 +456,7 @@ class DIMP * 'size' - The size of the attachment in KB (string) * */ - public function getAttachmentInfo($imp_compose) + static public function getAttachmentInfo($imp_compose) { $fwd_list = array(); @@ -477,7 +481,7 @@ class DIMP * * @return array The array of menu items. */ - public function menuList() + static public function menuList() { if (isset($GLOBALS['conf']['dimp']['menu']['apps'])) { $apps = $GLOBALS['conf']['dimp']['menu']['apps']; @@ -500,7 +504,7 @@ class DIMP * * @return string The link to the message composition screen. */ - public function composeLink($args = array(), $extra = array()) + static public function composeLink($args = array(), $extra = array()) { // IE 6 & 7 handles window.open() URL param strings differently if // triggered via an href or an onclick. Since we have no hint diff --git a/imp/lib/Folder.php b/imp/lib/Folder.php index 87f9776cb..19601e699 100644 --- a/imp/lib/Folder.php +++ b/imp/lib/Folder.php @@ -116,11 +116,11 @@ class IMP_Folder return $this->_listCache[$sig]; } - $imaptree = IMP_IMAP_Tree::singleton(); + $imaptree = IMP_Imap_Tree::singleton(); - $list_mask = IMP_IMAP_Tree::FLIST_CONTAINER | IMP_IMAP_Tree::FLIST_OB; + $list_mask = IMP_Imap_Tree::FLIST_CONTAINER | IMP_Imap_Tree::FLIST_OB; if (!$sub) { - $list_mask |= IMP_IMAP_Tree::FLIST_UNSUB; + $list_mask |= IMP_Imap_Tree::FLIST_UNSUB; } $flist = $imaptree->folderList($list_mask); @@ -197,7 +197,7 @@ class IMP_Folder if (!empty($deleted)) { /* Update the IMAP_Tree cache. */ - $imaptree = IMP_IMAP_Tree::singleton(); + $imaptree = IMP_Imap_Tree::singleton(); $imaptree->delete($deleted); $this->_onDelete($deleted); @@ -284,7 +284,7 @@ class IMP_Folder $this->clearFlistCache(); /* Update the IMAP_Tree object. */ - $imaptree = IMP_IMAP_Tree::singleton(); + $imaptree = IMP_Imap_Tree::singleton(); $imaptree->insert($folder); /* Recreate Virtual Folders. */ @@ -302,7 +302,7 @@ class IMP_Folder */ public function exists($folder) { - $imaptree = IMP_IMAP_Tree::singleton(); + $imaptree = IMP_Imap_Tree::singleton(); $elt = $imaptree->get($folder); if ($elt) { return !$imaptree->isContainer($elt); @@ -343,10 +343,10 @@ class IMP_Folder $deleted = array($old); $inserted = array($new); - $imaptree = IMP_IMAP_Tree::singleton(); + $imaptree = IMP_Imap_Tree::singleton(); /* Get list of any folders that are underneath this one. */ - $all_folders = array_merge(array($old), $imaptree->folderList(IMP_IMAP_Tree::FLIST_UNSUB, $old)); + $all_folders = array_merge(array($old), $imaptree->folderList(IMP_Imap_Tree::FLIST_UNSUB, $old)); $sub_folders = $imaptree->folderList(); try { @@ -405,7 +405,7 @@ class IMP_Folder if (!empty($subscribed)) { /* Initialize the IMAP_Tree object. */ - $imaptree = IMP_IMAP_Tree::singleton(); + $imaptree = IMP_Imap_Tree::singleton(); $imaptree->subscribe($subscribed); /* Reset the folder cache. */ @@ -451,7 +451,7 @@ class IMP_Folder if (!empty($unsubscribed)) { /* Initialize the IMAP_Tree object. */ - $imaptree = IMP_IMAP_Tree::singleton(); + $imaptree = IMP_Imap_Tree::singleton(); $imaptree->unsubscribe($unsubscribed); /* Reset the folder cache. */ diff --git a/imp/lib/IMAP.php b/imp/lib/Imap.php similarity index 99% rename from imp/lib/IMAP.php rename to imp/lib/Imap.php index b99a0f687..7eb8d9d0b 100644 --- a/imp/lib/IMAP.php +++ b/imp/lib/Imap.php @@ -1,6 +1,6 @@ * @package IMP */ -class IMP_IMAP +class IMP_Imap { /** * The Horde_Imap_Client object. diff --git a/imp/lib/IMAP/ACL.php b/imp/lib/Imap/Acl.php similarity index 97% rename from imp/lib/IMAP/ACL.php rename to imp/lib/Imap/Acl.php index ca800a878..7af5b5460 100644 --- a/imp/lib/IMAP/ACL.php +++ b/imp/lib/Imap/Acl.php @@ -10,12 +10,12 @@ * @author Chris Hastie * @package IMP */ -class IMP_IMAP_ACL +class IMP_Imap_Acl { /** * Singleton instance. * - * @var IMP_IMAP_ACL + * @var IMP_Imap_Acl */ static protected $_instance = null; @@ -39,12 +39,12 @@ class IMP_IMAP_ACL * Attempts to return a reference to a concrete object instance. * It will only create a new instance if no instance currently exists. * - * @return IMP_IMAP_ACL The created concrete instance. + * @return IMP_Imap_Acl The created concrete instance. */ static public function singleton() { if (!self::$_instance) { - self::$_instance = new IMP_IMAP_ACL(); + self::$_instance = new IMP_Imap_Acl(); } return self::$_instance; diff --git a/imp/lib/IMAP/Thread.php b/imp/lib/Imap/Thread.php similarity index 96% rename from imp/lib/IMAP/Thread.php rename to imp/lib/Imap/Thread.php index 99458b2bc..9a409ce90 100644 --- a/imp/lib/IMAP/Thread.php +++ b/imp/lib/Imap/Thread.php @@ -1,6 +1,6 @@ * @package IMP */ -class IMP_IMAP_Thread +class IMP_Imap_Thread { /** * The thread data object. @@ -38,7 +38,7 @@ class IMP_IMAP_Thread * * @param Horde_Imap_Client_Thread $thread The thread data object. */ - function __construct($thread) + public function __construct($thread) { $this->_thread = $thread; } diff --git a/imp/lib/IMAP/Tree.php b/imp/lib/Imap/Tree.php similarity index 98% rename from imp/lib/IMAP/Tree.php rename to imp/lib/Imap/Tree.php index aace11e1e..9a1945006 100644 --- a/imp/lib/IMAP/Tree.php +++ b/imp/lib/Imap/Tree.php @@ -1,6 +1,6 @@ * @package IMP */ -class IMP_IMAP_Tree +class IMP_Imap_Tree { /* Constants for mailboxElt attributes. */ const ELT_NOSELECT = 1; @@ -68,6 +68,13 @@ class IMP_IMAP_Tree public $OTHER_KEY; /** + * Singleton instance + * + * @var IMP_Imap_Tree + */ + static protected $_instance = null; + + /** * Array containing the mailbox tree. * * @var array @@ -187,29 +194,27 @@ class IMP_IMAP_Tree protected $_forceopen = false; /** - * Attempts to return a reference to a concrete IMP_IMAP_Tree instance. + * Attempts to return a reference to a concrete IMP_Imap_Tree instance. * - * If an IMP_IMAP_Tree object is currently stored in the cache, re-create + * If an IMP_Imap_Tree object is currently stored in the cache, re-create * that object. Else, create a new instance. Ensures that only one * instance is available at any time. * - * @return IMP_IMAP_Tree The object or null. + * @return IMP_Imap_Tree The object or null. */ static public function singleton() { - static $instance; - - if (!isset($instance)) { + if (is_null(self::$_instance)) { if (!empty($_SESSION['imp']['cache']['tree'])) { $imp_cache = IMP::getCache(); - $instance = unserialize($imp_cache->get($_SESSION['imp']['cache']['tree'], 86400)); + self::$_instance = unserialize($imp_cache->get($_SESSION['imp']['cache']['tree'], 86400)); } - if (empty($instance)) { - $instance = new IMP_IMAP_Tree(); + if (empty(self::$_instance)) { + self::$_instance = new IMP_Imap_Tree(); } } - return $instance; + return self::$_instance; } /** @@ -548,8 +553,8 @@ class IMP_IMAP_Tree * * @param integer $mask A mask with the following elements: *
-     * IMP_IMAP_Tree::NEXT_SHOWCLOSED - Don't ignore closed elements.
-     * IMP_IMAP_Tree::NEXT_SHOWSUB - Only show subscribed elements.
+     * IMP_Imap_Tree::NEXT_SHOWCLOSED - Don't ignore closed elements.
+     * IMP_Imap_Tree::NEXT_SHOWSUB - Only show subscribed elements.
      * 
* * @return mixed Returns the next element or false if the element doesn't @@ -1672,10 +1677,10 @@ class IMP_IMAP_Tree * * @param integer $mask A mask with the following elements: *
-     * IMP_IMAP_Tree::FLIST_CONTAINER - Show container elements.
-     * IMP_IMAP_Tree::FLIST_UNSUB - Show unsubscribed elements.
-     * IMP_IMAP_Tree::FLIST_OB - Return full tree object.
-     * IMP_IMAP_Tree::FLIST_VFOLDER - Show Virtual Folders.
+     * IMP_Imap_Tree::FLIST_CONTAINER - Show container elements.
+     * IMP_Imap_Tree::FLIST_UNSUB - Show unsubscribed elements.
+     * IMP_Imap_Tree::FLIST_OB - Return full tree object.
+     * IMP_Imap_Tree::FLIST_VFOLDER - Show Virtual Folders.
      * 
* @param string $base Return all mailboxes below this element. * diff --git a/imp/lib/Search.php b/imp/lib/Search.php index 9b4dfa916..5324e20fc 100644 --- a/imp/lib/Search.php +++ b/imp/lib/Search.php @@ -92,7 +92,7 @@ class IMP_Search $_SESSION['imp']['search'] = array('q' => array()); } if (!$no_vf) { - $imaptree = &IMP_IMAP_Tree::singleton(); + $imaptree = &IMP_Imap_Tree::singleton(); foreach ($this->_getVFolderList() as $key => $val) { if (!empty($val['vfolder']) && !$this->isVTrashFolder($key) && @@ -223,7 +223,7 @@ class IMP_Search unset($vfolders[$id]); $this->_saveVFolderList($vfolders); if (!$no_delete) { - $imaptree = &IMP_IMAP_Tree::singleton(); + $imaptree = &IMP_Imap_Tree::singleton(); $imaptree->delete($id); } } @@ -330,7 +330,7 @@ class IMP_Search $this->_saveVFolderList($vfolders); } - $imaptree = &IMP_IMAP_Tree::singleton(); + $imaptree = &IMP_Imap_Tree::singleton(); $imaptree->insertVFolders(array($id => $label)); return $id; @@ -398,8 +398,8 @@ class IMP_Search */ public function createVINBOXFolder() { - /* Initialize IMP_IMAP_Tree. */ - $imaptree = &IMP_IMAP_Tree::singleton(); + /* Initialize IMP_Imap_Tree. */ + $imaptree = &IMP_Imap_Tree::singleton(); /* Delete the current Virtual Inbox folder, if it exists. */ $vinbox_id = $GLOBALS['prefs']->getValue('vinbox_id'); diff --git a/imp/lib/Views/ListMessages.php b/imp/lib/Views/ListMessages.php index c0fe260ba..b470a4998 100644 --- a/imp/lib/Views/ListMessages.php +++ b/imp/lib/Views/ListMessages.php @@ -55,7 +55,7 @@ class IMP_Views_ListMessages /* Create folder search list. */ switch ($args['searchfolder']) { case 'all': - $imptree = &IMP_IMAP_Tree::singleton(); + $imptree = &IMP_Imap_Tree::singleton(); $folder_list = $imptree->folderList(); break; @@ -232,7 +232,7 @@ class IMP_Views_ListMessages /* Get unseen/thread information. */ if (is_null($search_id)) { - $imptree = &IMP_IMAP_Tree::singleton(); + $imptree = &IMP_Imap_Tree::singleton(); $info = $imptree->getElementInfo($mbox); if (!empty($info)) { $md->unseen = $info['unseen']; @@ -240,7 +240,7 @@ class IMP_Views_ListMessages if ($sortpref['by'] == Horde_Imap_Client::SORT_THREAD) { $threadob = $imp_mailbox->getThreadOb(); - $imp_thread = new IMP_IMAP_Thread($threadob); + $imp_thread = new IMP_Imap_Thread($threadob); $md->thread = $imp_thread->getThreadTreeOb($msglist, $sortpref['dir']); } } else { diff --git a/imp/lib/api.php b/imp/lib/api.php index 319cb3578..6166af1de 100644 --- a/imp/lib/api.php +++ b/imp/lib/api.php @@ -116,7 +116,7 @@ function _imp_authCredentials() $app_name = $GLOBALS['registry']->get('name'); require_once dirname(__FILE__) . '/IMAP.php'; - $servers = IMP_IMAP::loadServerConfig(); + $servers = IMP_Imap::loadServerConfig(); $server_list = array(); foreach ($servers as $key => $val) { $server_list[$key] = $val['name']; @@ -302,7 +302,7 @@ function _imp_changeLanguage() if (IMP::checkAuthentication(true)) { $imp_folder = &IMP_Folder::singleton(); $imp_folder->clearFlistCache(); - $imaptree = &IMP_IMAP_Tree::singleton(); + $imaptree = &IMP_Imap_Tree::singleton(); $imaptree->init(); $imp_search = new IMP_Search(); $imp_search->sessionSetup(true); diff --git a/imp/lib/base.php b/imp/lib/base.php index a22f4d67c..729e3a886 100644 --- a/imp/lib/base.php +++ b/imp/lib/base.php @@ -17,7 +17,7 @@ * $session_control - Sets special session control limitations * * Global variables defined: - * $imp_imap - An IMP_IMAP object + * $imp_imap - An IMP_Imap object * $imp_mbox - Current mailbox information * $imp_notify - A Notification_Listener_Mobile object * $imp_search - An IMP_Search object @@ -91,7 +91,7 @@ if (!defined('IMP_TEMPLATES')) { // Initialize global $imp_imap object. if (!isset($GLOBALS['imp_imap'])) { - $GLOBALS['imp_imap'] = new IMP_IMAP(); + $GLOBALS['imp_imap'] = new IMP_Imap(); } // Start compression. diff --git a/imp/lib/prefs.php b/imp/lib/prefs.php index 3a5223c26..ac6b4d91a 100644 --- a/imp/lib/prefs.php +++ b/imp/lib/prefs.php @@ -179,7 +179,7 @@ function prefs_callback() if ($prefs->isDirty('subscribe') || $prefs->isDirty('tree_view')) { $imp_folder = &IMP_Folder::singleton(); $imp_folder->clearFlistCache(); - $imaptree = &IMP_IMAP_Tree::singleton(); + $imaptree = &IMP_Imap_Tree::singleton(); $imaptree->init(); } diff --git a/imp/mailbox.php b/imp/mailbox.php index 53d95dd0f..7d9dda68f 100644 --- a/imp/mailbox.php +++ b/imp/mailbox.php @@ -596,7 +596,7 @@ $messages = $threadlevel = array(); /* Get thread object, if necessary. */ if ($sortpref['by'] == Horde_Imap_Client::SORT_THREAD) { - $imp_thread = new IMP_IMAP_Thread($imp_mailbox->getThreadOb()); + $imp_thread = new IMP_Imap_Thread($imp_mailbox->getThreadOb()); $threadtree = $imp_thread->getThreadImageTree(reset($mbox_info['uids']), $sortpref['dir']); } diff --git a/imp/thread.php b/imp/thread.php index b3fb7dc23..2c0992049 100644 --- a/imp/thread.php +++ b/imp/thread.php @@ -68,7 +68,7 @@ if ($mode == 'thread') { $index_array = $imp_mailbox->getIMAPIndex(); $thread = $threadob->getThread($index_array['index']); - $imp_thread = new IMP_IMAP_Thread($threadob); + $imp_thread = new IMP_Imap_Thread($threadob); $threadtree = $imp_thread->getThreadImageTree($thread, false); $loop_array = array($imp_mbox['mailbox'] => $thread); } else { -- 2.11.0