PHP 5 coding standards
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 7 Jul 2009 22:30:52 +0000 (16:30 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 8 Jul 2009 16:27:42 +0000 (10:27 -0600)
48 files changed:
imp/acl.php
imp/ajax.php
imp/attachment.php
imp/compose-dimp.php
imp/compose-mimp.php
imp/compose.php
imp/folders-mimp.php
imp/folders.php
imp/lib/Block/Foldersummary.php
imp/lib/Block/summary.php
imp/lib/Block/tree_folders.php
imp/lib/Crypt/Smime.php
imp/lib/Filter.php
imp/lib/LoginTasks/Task/DeleteSentmailMonthly.php
imp/lib/LoginTasks/Task/RenameSentmailMonthly.php
imp/lib/Maillog.php
imp/lib/Mime/Viewer/Itip.php
imp/lib/Mime/Viewer/Tnef.php
imp/lib/Mime/Viewer/Zip.php
imp/lib/Quota.php
imp/lib/Quota/sql.php
imp/lib/Search.php
imp/lib/Session.php
imp/lib/Spam.php
imp/lib/UI/Compose.php
imp/lib/UI/Mailbox.php
imp/lib/UI/Message.php
imp/lib/Views/Compose.php
imp/lib/Views/ListMessages.php
imp/lib/Views/ShowMessage.php
imp/lib/api.php
imp/lib/base.php
imp/lib/prefs.php
imp/mailbox-mimp.php
imp/mailbox.php
imp/message-mimp.php
imp/message.php
imp/pgp.php
imp/rss.php
imp/saveimage.php
imp/search.php
imp/smime.php
imp/stationery.php
imp/templates/folders/folders-mimp.inc
imp/templates/index/index-dimp.inc
imp/templates/javascript_defs_dimp.php
imp/templates/prefs/flagmanagement.inc
imp/thread.php

index ba2e209..34d812f 100644 (file)
@@ -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);
@@ -119,7 +119,7 @@ case 'imp_acl_set':
     break;
 }
 
-$imp_folder = &IMP_Folder::singleton();
+$imp_folder = IMP_Folder::singleton();
 $rights = $ACLDriver->getRights();
 
 if (empty($folder)) {
index 2ac83a8..e319fd2 100644 (file)
@@ -246,7 +246,7 @@ case 'EmptyFolder':
         break;
     }
 
-    $imp_message = &IMP_Message::singleton();
+    $imp_message = IMP_Message::singleton();
     $imp_message->emptyMailbox(array($mbox));
     $result = new stdClass;
     $result->mbox = $mbox;
@@ -260,7 +260,7 @@ case 'FlagAll':
 
     $set = Horde_Util::getPost('set');
 
-    $imp_message = &IMP_Message::singleton();
+    $imp_message = IMP_Message::singleton();
     $result = $imp_message->flagAllInMailbox($flags, array($mbox), $set);
 
     if ($result) {
@@ -356,7 +356,7 @@ case 'CopyMessage':
         $change = _changed($mbox, $cacheid, true);
     }
 
-    $imp_message = &IMP_Message::singleton();
+    $imp_message = IMP_Message::singleton();
 
     $result = $imp_message->copy($to, ($action == 'MoveMessage') ? 'move' : 'copy', $indices);
 
@@ -397,7 +397,7 @@ case 'FlagMessage':
         }
     }
 
-    $imp_message = &IMP_Message::singleton();
+    $imp_message = IMP_Message::singleton();
     if (!empty($set)) {
         $result = $imp_message->flag($set, $indices, true);
     }
@@ -415,7 +415,7 @@ case 'DeleteMessage':
         break;
     }
 
-    $imp_message = &IMP_Message::singleton();
+    $imp_message = IMP_Message::singleton();
     $change = _changed($mbox, $cacheid, true);
     $result = $imp_message->delete($indices);
     if ($result) {
@@ -537,7 +537,7 @@ case 'DeleteDraft':
     $imp_compose = IMP_Compose::singleton(Horde_Util::getPost('imp_compose'));
     $imp_compose->destroy();
     if ($action == 'DeleteDraft') {
-        $imp_message = &IMP_Message::singleton();
+        $imp_message = IMP_Message::singleton();
         $idx_array = array($imp_compose->getMetadata('draft_index') . IMP::IDX_SEP . IMP::folderPref($prefs->getValue('drafts_folder'), true));
         $imp_message->delete($idx_array, array('nuke' => true));
     }
@@ -628,7 +628,7 @@ case 'PurgeDeleted':
         $sort = IMP::getSort($mbox);
         $change = ($sort['by'] == Horde_Imap_Client::SORT_THREAD);
     }
-    $imp_message = &IMP_Message::singleton();
+    $imp_message = IMP_Message::singleton();
     $expunged = $imp_message->expungeMailbox(array($mbox => 1), array('list' => true));
     if (!empty($expunged[$mbox])) {
         $expunge_count = count($expunged[$mbox]);
index 753f1e1..cd40dae 100644 (file)
@@ -37,7 +37,7 @@ if (is_null($mail_user) || is_null($time_stamp) || is_null($file_name)) {
 }
 
 // Initialize the VFS.
-$vfsroot = &VFS::singleton($conf['vfs']['type'], Horde::getDriverConfig('vfs', $conf['vfs']['type']));
+$vfsroot = VFS::singleton($conf['vfs']['type'], Horde::getDriverConfig('vfs', $conf['vfs']['type']));
 if (is_a($vfsroot, 'PEAR_Error')) {
     Horde::fatal(sprintf(_("Could not create the VFS backend: %s"), $vfsroot->getMessage()), $self_url, __LINE__);
 }
@@ -74,11 +74,11 @@ if ($conf['compose']['link_attachments_notify']) {
             /* Load $mail_user's preferences so that we can use their
              * locale information for the notification message. */
             include_once 'Horde/Prefs.php';
-            $prefs = &Prefs::singleton($conf['prefs']['driver'], 'horde', $mail_user);
+            $prefs = Prefs::singleton($conf['prefs']['driver'], 'horde', $mail_user);
             $prefs->retrieve();
 
             include_once 'Horde/Identity.php';
-            $mail_identity = &Identity::singleton('none', $mail_user);
+            $mail_identity = Identity::singleton('none', $mail_user);
             $mail_address = $mail_identity->getDefaultFromAddress();
 
             /* Ignore missing addresses, which are returned as <>. */
index c96c0a7..2f76226 100644 (file)
@@ -20,7 +20,7 @@
 function _removeAutoSaveDraft($index)
 {
     if (!empty($index)) {
-        $imp_message = &IMP_Message::singleton();
+        $imp_message = IMP_Message::singleton();
         $imp_message->delete(array($index . IMP::IDX_SEP . IMP::folderPref($GLOBALS['prefs']->getValue('drafts_folder'), true)), array('nuke' => true));
     }
 }
@@ -42,7 +42,7 @@ $get_sig = true;
 $msg = '';
 
 require_once 'Horde/Identity.php';
-$identity = &Identity::singleton(array('imp', 'imp'));
+$identity = Identity::singleton(array('imp', 'imp'));
 if (!$prefs->isLocked('default_identity')) {
     $identity_id = Horde_Util::getFormData('identity');
     if (!is_null($identity_id)) {
@@ -54,7 +54,7 @@ if (!$prefs->isLocked('default_identity')) {
 NLS::setTimeZone();
 
 /* Initialize the IMP_Compose:: object. */
-$imp_compose = &IMP_Compose::singleton(Horde_Util::getFormData('composeCache'));
+$imp_compose = IMP_Compose::singleton(Horde_Util::getFormData('composeCache'));
 
 /* Init IMP_UI_Compose:: object. */
 $imp_ui = new IMP_UI_Compose();
@@ -149,7 +149,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(
@@ -218,7 +218,7 @@ if (in_array($type, array('reply', 'reply_all', 'reply_list', 'forward', 'resume
     }
 
     try {
-        $imp_contents = &IMP_Contents::singleton($index . IMP::IDX_SEP . $folder);
+        $imp_contents = IMP_Contents::singleton($index . IMP::IDX_SEP . $folder);
     } catch (Horde_Exception $e) {
         $notification->push(_("Requested message not found."), 'horde.error');
         $index = $folder = null;
index 6faee1e..7ef7253 100644 (file)
  * @package IMP
  */
 
-function &_getIMPContents($index, $mailbox)
+function _getIMPContents($index, $mailbox)
 {
     if (empty($index)) {
         return false;
     }
     try {
-        $imp_contents = &IMP_Contents::singleton($index . IMP::IDX_SEP . $mailbox);
+        $imp_contents = IMP_Contents::singleton($index . IMP::IDX_SEP . $mailbox);
         return $imp_contents;
     } catch (Horde_Exception $e) {
         $GLOBALS['notification']->push(_("Could not retrieve the message from the mail server."), 'horde.error');
@@ -34,7 +34,7 @@ $msg = '';
 $header = array();
 
 /* Set the current identity. */
-$identity = &Identity::singleton(array('imp', 'imp'));
+$identity = Identity::singleton(array('imp', 'imp'));
 if (!$prefs->isLocked('default_identity')) {
     $identity_id = Horde_Util::getFormData('identity');
     if (!is_null($identity_id)) {
@@ -63,7 +63,7 @@ $compose_disable = !empty($conf['hooks']['disable_compose']) &&
 NLS::setTimeZone();
 
 /* Initialize the IMP_Compose:: object. */
-$imp_compose = &IMP_Compose::singleton(Horde_Util::getFormData('composeCache'));
+$imp_compose = IMP_Compose::singleton(Horde_Util::getFormData('composeCache'));
 
 /* Run through the action handlers. */
 $actionID = Horde_Util::getFormData('a');
@@ -110,7 +110,7 @@ case _("Expand Names"):
 case 'r':
 case 'ra':
 case 'rl':
-    if (!($imp_contents = &_getIMPContents($index, $thismailbox))) {
+    if (!($imp_contents = _getIMPContents($index, $thismailbox))) {
         break;
     }
     $actions = array('r' => 'reply', 'ra' => 'reply_all', 'rl' => 'reply_list');
@@ -122,7 +122,7 @@ case 'rl':
 
 // 'f' = forward
 case 'f':
-    if (!($imp_contents = &_getIMPContents($index, $thismailbox))) {
+    if (!($imp_contents = _getIMPContents($index, $thismailbox))) {
         break;
     }
     $fwd_msg = $imp_compose->forwardMessage($imp_contents);
@@ -132,7 +132,7 @@ case 'f':
     break;
 
 case _("Redirect"):
-    if (!($imp_contents = &_getIMPContents($index, $thismailbox))) {
+    if (!($imp_contents = _getIMPContents($index, $thismailbox))) {
         break;
     }
 
@@ -166,7 +166,7 @@ case _("Send"):
     $thismailbox = $imp_compose->getMetadata('mailbox');
 
     if ($ctype = $imp_compose->getMetadata('reply_type')) {
-        if (!($imp_contents = &_getIMPContents($index, $thismailbox))) {
+        if (!($imp_contents = _getIMPContents($index, $thismailbox))) {
             break;
         }
 
@@ -221,7 +221,7 @@ case _("Send"):
 
             if (Horde_Util::getFormData('resume_draft') &&
                 $prefs->getValue('auto_delete_drafts')) {
-                $imp_message = &IMP_Message::singleton();
+                $imp_message = IMP_Message::singleton();
                 $idx_array = array($index . IMP::IDX_SEP . $thismailbox);
                 $delete_draft = $imp_message->delete($idx_array, array('nuke' => true));
             }
index c96de27..a9dcf1d 100644 (file)
@@ -40,14 +40,14 @@ function _popupSuccess()
     require $GLOBALS['registry']->get('templates', 'horde') . '/common-footer.inc';
 }
 
-function &_getIMPContents($index, $mailbox)
+function _getIMPContents($index, $mailbox)
 {
     if (empty($index)) {
         return false;
     }
 
     try {
-        $imp_contents = &IMP_Contents::singleton($index . IMP::IDX_SEP . $mailbox);
+        $imp_contents = IMP_Contents::singleton($index . IMP::IDX_SEP . $mailbox);
         return $imp_contents;
     } catch (Horde_Exception $e) {
         $GLOBALS['notification']->push(_("Could not retrieve the message from the mail server."), 'horde.error');
@@ -70,7 +70,7 @@ $pgp_passphrase_dialog = $pgp_symmetric_passphrase_dialog = $showmenu = $smime_p
 $cursor_pos = $oldrtemode = $rtemode = $siglocation = null;
 
 /* Set the current identity. */
-$identity = &Identity::singleton(array('imp', 'imp'));
+$identity = Identity::singleton(array('imp', 'imp'));
 if (!$prefs->isLocked('default_identity')) {
     $identity_id = Horde_Util::getFormData('identity');
     if (!is_null($identity_id)) {
@@ -153,7 +153,7 @@ if ($readonly_sentmail) {
 }
 
 /* Initialize the IMP_Compose:: object. */
-$imp_compose = &IMP_Compose::singleton(Horde_Util::getFormData('composeCache'));
+$imp_compose = IMP_Compose::singleton(Horde_Util::getFormData('composeCache'));
 $imp_compose->pgpAttachPubkey((bool) Horde_Util::getFormData('pgp_attach_pubkey'));
 $imp_compose->userLinkAttachments((bool) Horde_Util::getFormData('link_attachments'));
 
@@ -248,7 +248,7 @@ if ($_SESSION['imp']['file_upload']) {
 $title = _("New Message");
 switch ($actionID) {
 case 'mailto':
-    if (!($imp_contents = &_getIMPContents($index, $thismailbox))) {
+    if (!($imp_contents = _getIMPContents($index, $thismailbox))) {
         break;
     }
     $imp_headers = $imp_contents->getHeaderOb();
@@ -309,7 +309,7 @@ case 'redirect_expand_addr':
 case 'reply':
 case 'reply_all':
 case 'reply_list':
-    if (!($imp_contents = &_getIMPContents($index, $thismailbox))) {
+    if (!($imp_contents = _getIMPContents($index, $thismailbox))) {
         break;
     }
 
@@ -335,7 +335,7 @@ case 'reply_list':
     break;
 
 case 'forward':
-    if (!($imp_contents = &_getIMPContents($index, $thismailbox))) {
+    if (!($imp_contents = _getIMPContents($index, $thismailbox))) {
         break;
     }
 
@@ -353,7 +353,7 @@ case 'redirect_compose':
     break;
 
 case 'redirect_send':
-    if (!($imp_contents = &_getIMPContents($index, $thismailbox))) {
+    if (!($imp_contents = _getIMPContents($index, $thismailbox))) {
         break;
     }
 
@@ -449,7 +449,7 @@ case 'send_message':
     if (Horde_Util::getFormData('resume_draft') &&
         $prefs->getValue('auto_delete_drafts') &&
         ($thismailbox == IMP::folderPref($prefs->getValue('drafts_folder'), true)))  {
-        $imp_message = &IMP_Message::singleton();
+        $imp_message = IMP_Message::singleton();
         $idx_array = array($index . IMP::IDX_SEP . $thismailbox);
         if ($imp_message->delete($idx_array)) {
             $notification->push(_("The draft message was automatically deleted because it was successfully completed and sent."), 'horde.success');
@@ -735,7 +735,7 @@ if ($prefs->getValue('use_pgp') && !$prefs->isLocked('default_encrypt')) {
         try {
             $addrs = $imp_compose->recipientList($header);
             if (!empty($addrs['list'])) {
-                $imp_pgp = &Horde_Crypt::singleton(array('IMP', 'Pgp'));
+                $imp_pgp = Horde_Crypt::singleton(array('IMP', 'Pgp'));
                 foreach ($addrs['list'] as $val) {
                     $imp_pgp->getPublicKey($val);
                 }
index b8e0b20..e4e2070 100644 (file)
@@ -30,7 +30,7 @@ $subscribe = $prefs->getValue('subscribe');
 $showAll = (!$subscribe || $_SESSION['imp']['showunsub']);
 
 /* Initialize the IMP_Imap_Tree object. */
-$imptree = &IMP_Imap_Tree::singleton();
+$imptree = IMP_Imap_Tree::singleton();
 $mask = IMP_Imap_Tree::NEXT_SHOWCLOSED;
 
 /* Toggle subscribed view, if necessary. */
index 90a82e8..c145004 100644 (file)
@@ -60,10 +60,10 @@ IMP::addInlineScript(array(
 ));
 
 /* Initialize the IMP_Folder object. */
-$imp_folder = &IMP_Folder::singleton();
+$imp_folder = IMP_Folder::singleton();
 
 /* Initialize the IMP_Imap_Tree object. */
-$imaptree = &IMP_Imap_Tree::singleton();
+$imaptree = IMP_Imap_Tree::singleton();
 
 /* $folder_list is already encoded in UTF7-IMAP. */
 $folder_list = Horde_Util::getFormData('folder_list', array());
@@ -110,7 +110,7 @@ case 'rebuild_tree':
 
 case 'expunge_folder':
     if (!empty($folder_list)) {
-        $imp_message = &IMP_Message::singleton();
+        $imp_message = IMP_Message::singleton();
         $imp_message->expungeMailbox(array_flip($folder_list));
     }
     break;
@@ -135,7 +135,7 @@ case 'download_folder_zip':
         if ($actionID == 'download_folder') {
             $browser->downloadHeaders($folder_list[0] . '.mbox', null, false, strlen($mbox));
         } else {
-            $horde_compress = &Horde_Compress::singleton('zip');
+            $horde_compress = Horde_Compress::singleton('zip');
             $mbox = $horde_compress->compress(array(array('data' => $mbox, 'name' => $folder_list[0] . '.mbox')));
             $browser->downloadHeaders($folder_list[0] . '.zip', 'application/zip', false, strlen($mbox));
         }
@@ -223,7 +223,7 @@ case 'nopoll_folder':
 
 case 'folders_empty_mailbox':
     if (!empty($folder_list)) {
-        $imp_message = &IMP_Message::singleton();
+        $imp_message = IMP_Message::singleton();
         $imp_message->emptyMailbox($folder_list);
     }
     break;
@@ -231,7 +231,7 @@ case 'folders_empty_mailbox':
 case 'mark_folder_seen':
 case 'mark_folder_unseen':
     if (!empty($folder_list)) {
-        $imp_message = &IMP_Message::singleton();
+        $imp_message = IMP_Message::singleton();
         $imp_message->flagAllInMailbox(array('seen'), $folder_list, ($actionID == 'mark_folder_seen'));
     }
     break;
@@ -296,7 +296,7 @@ case 'mbox_size':
         $loop = array();
         $rowct = $sum = 0;
 
-        $imp_message = &IMP_Message::singleton();
+        $imp_message = IMP_Message::singleton();
 
         foreach ($folder_list as $val) {
             $size = $imp_message->sizeMailbox($val, false);
index 0cbe79b..5681725 100644 (file)
@@ -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;
index e860827..6e687c4 100644 (file)
@@ -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. */
index e45a1d2..04a0316 100644 (file)
@@ -55,7 +55,7 @@ class Horde_Block_imp_tree_folders extends Horde_Block
         $name_url = Horde_Util::addParameter(Horde::applicationUrl('mailbox.php'), 'no_newmail_popup', 1);
 
         /* Initialize the IMP_Tree object. */
-        $imaptree = &IMP_Imap_Tree::singleton();
+        $imaptree = IMP_Imap_Tree::singleton();
         $mask = IMP_Imap_Tree::NEXT_SHOWCLOSED;
         if ($GLOBALS['prefs']->getValue('subscribe')) {
             $mask |= IMP_Imap_Tree::NEXT_SHOWSUB;
index bb0214b..07a8f5b 100644 (file)
@@ -171,7 +171,7 @@ class IMP_Crypt_Smime extends Horde_Crypt_Smime
         /* See if the address points to the user's public key. */
         if (is_a($key, 'PEAR_Error')) {
             require_once 'Horde/Identity.php';
-            $identity = &Identity::singleton(array('imp', 'imp'));
+            $identity = Identity::singleton(array('imp', 'imp'));
             $personal_pubkey = $this->getPersonalPublicKey();
             if (!empty($personal_pubkey) && $identity->hasAddress($address)) {
                 return $personal_pubkey;
index 155c17b..1bcabb0 100644 (file)
@@ -56,7 +56,7 @@ class IMP_Filter
     public function blacklistMessage($indices, $show_link = true)
     {
         if ($this->_processBWlist($indices, _("your blacklist"), 'blacklistFrom', 'showBlacklist', $show_link)) {
-            $imp_message = &IMP_Message::singleton();
+            $imp_message = IMP_Message::singleton();
 
             if (($msg_count = $imp_message->delete($indices))) {
                 if ($msg_count == 1) {
@@ -109,7 +109,7 @@ class IMP_Filter
         $addr = array();
         foreach ($msgList as $mbox => $msgIndices) {
             foreach ($msgIndices as $idx) {
-                $contents = &IMP_Contents::singleton($idx . IMP::IDX_SEP . $mbox);
+                $contents = IMP_Contents::singleton($idx . IMP::IDX_SEP . $mbox);
                 $hdr = $contents->getHeaderOb();
                 $addr[] = Horde_Mime_Address::bareAddress($hdr->getValue('from'));
             }
index 6e1b440..c0985ec 100644 (file)
@@ -35,8 +35,8 @@ class IMP_LoginTasks_Task_DeleteSentmailMonthly extends Horde_LoginTasks_Task
            old sent-mail folders. Then sort this array according to
            the date. */
         include_once 'Horde/Identity.php';
-        $identity = &Identity::singleton(array('imp', 'imp'));
-        $imp_folder = &IMP_Folder::singleton();
+        $identity = Identity::singleton(array('imp', 'imp'));
+        $imp_folder = IMP_Folder::singleton();
         $sent_mail_folders = $identity->getAllSentmailFolders();
 
         $folder_array = array();
index a84cbd1..00cc5b5 100644 (file)
@@ -35,8 +35,8 @@ class IMP_LoginTasks_Task_RenameSentmailMonthly extends Horde_LoginTasks_Task
 
         include_once 'Horde/Identity.php';
 
-        $identity = &Identity::singleton(array('imp', 'imp'));
-        $imp_folder = &IMP_Folder::singleton();
+        $identity = Identity::singleton(array('imp', 'imp'));
+        $imp_folder = IMP_Folder::singleton();
 
         foreach ($identity->getAllSentmailfolders() as $sent_folder) {
             /* Display a message to the user and rename the folder.
@@ -67,7 +67,7 @@ class IMP_LoginTasks_Task_RenameSentmailMonthly extends Horde_LoginTasks_Task
     public function describe()
     {
         include_once 'Horde/Identity.php';
-        $identity = &Identity::singleton(array('imp', 'imp'));
+        $identity = Identity::singleton(array('imp', 'imp'));
 
         $new_folders = $old_folders = array();
         foreach ($identity->getAllSentmailfolders() as $folder) {
index 9d254b0..031d318 100644 (file)
@@ -26,7 +26,7 @@ class IMP_Maillog
      */
     static public function log($type, $msg_ids, $data = null)
     {
-        $history = &Horde_History::singleton();
+        $history = Horde_History::singleton();
 
         if (!is_array($msg_ids)) {
             $msg_ids = array($msg_ids);
@@ -75,7 +75,7 @@ class IMP_Maillog
      */
     static public function getLog($msg_id)
     {
-        $history = &Horde_History::singleton();
+        $history = Horde_History::singleton();
 
         $res = $history->getHistory(self::_getUniqueHistoryId($msg_id));
         if (is_a($res, 'PEAR_Error')) {
@@ -193,7 +193,7 @@ class IMP_Maillog
         }
         $msg_ids = array_map(array('IMP_Maillog', '_getUniqueHistoryId'), $msg_ids);
 
-        $history = &Horde_History::singleton();
+        $history = Horde_History::singleton();
         return $history->removeByNames($msg_ids);
     }
 
index 501aa16..853c02d 100644 (file)
@@ -236,7 +236,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                     $vCal->setAttribute('PRODID', '-//The Horde Project//' . HORDE_AGENT_HEADER . '//EN');
                     $vCal->setAttribute('METHOD', 'REPLY');
 
-                    $vEvent_reply = &Horde_iCalendar::newComponent('vevent', $vCal);
+                    $vEvent_reply = Horde_iCalendar::newComponent('vevent', $vCal);
                     $vEvent_reply->setAttribute('UID', $vEvent->getAttribute('UID'));
                     if (!is_a($vEvent->getAttribute('SUMMARY'), 'PEAR_error')) {
                         $vEvent_reply->setAttribute('SUMMARY', $vEvent->getAttribute('SUMMARY'));
@@ -259,7 +259,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                     $vEvent_reply->setAttribute('ORGANIZER', $vEvent->getAttribute('ORGANIZER'), array_pop($organizer));
 
                     // Find out who we are and update status.
-                    $identity = &Identity::singleton(array('imp', 'imp'));
+                    $identity = Identity::singleton(array('imp', 'imp'));
                     $attendees = $vEvent->getAttribute('ATTENDEE');
                     if (!is_array($attendees)) {
                         $attendees = array($attendees);
@@ -399,7 +399,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                     require_once 'Horde/Identity.php';
 
                     // Find out who we are and update status.
-                    $identity = &Identity::singleton();
+                    $identity = Identity::singleton();
                     $email = $identity->getFromAddress();
 
                     // Build the reply.
@@ -632,7 +632,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                 $is_attendee = false;
                 if (!is_a($attendees, 'PEAR_Error') && !empty($attendees)) {
                     require_once 'Horde/Identity.php';
-                    $identity = &Identity::singleton(array('imp', 'imp'));
+                    $identity = Identity::singleton(array('imp', 'imp'));
                     for ($i = 0, $c = count($attendees); $i < $c; ++$i) {
                         $attendee = parse_url($attendees[$i]);
                         if (!empty($attendee['path']) &&
index b8479fd..c534878 100644 (file)
@@ -46,7 +46,7 @@ class IMP_Horde_Mime_Viewer_Tnef extends Horde_Mime_Viewer_Tnef
         }
 
         /* Get the data from the attachment. */
-        $tnef = &Horde_Compress::singleton('tnef');
+        $tnef = Horde_Compress::singleton('tnef');
         $tnefData = $tnef->decompress($this->_mimepart->getContents());
 
         /* Display the requested file. Its position in the $tnefData
@@ -80,7 +80,7 @@ class IMP_Horde_Mime_Viewer_Tnef extends Horde_Mime_Viewer_Tnef
     protected function _renderInfo()
     {
         /* Get the data from the attachment. */
-        $tnef = &Horde_Compress::singleton('tnef');
+        $tnef = Horde_Compress::singleton('tnef');
         $tnefData = $tnef->decompress($this->_mimepart->getContents());
 
         $text = '';
index f2d9d45..c03e92b 100644 (file)
@@ -34,7 +34,7 @@ class IMP_Horde_Mime_Viewer_Zip extends Horde_Mime_Viewer_Zip
         /* Send the requested file. Its position in the zip archive is located
          * in 'zip_attachment'. */
         $data = $this->_mimepart->getContents();
-        $zip = &Horde_Compress::singleton('zip');
+        $zip = Horde_Compress::singleton('zip');
         $fileKey = Horde_Util::getFormData('zip_attachment') - 1;
         $zipInfo = $zip->decompress($data, array('action' => HORDE_COMPRESS_ZIP_LIST));
 
index 4627228..f49648f 100644 (file)
@@ -34,7 +34,7 @@ class IMP_Quota
      * It will only create a new instance if no instance with the same
      * parameters currently exists.
      *
-     * This method must be invoked as: $var = &IMP_Quota::singleton()
+     * This method must be invoked as: $var = IMP_Quota::singleton()
      *
      * @param string $driver  The type of concrete subclass to return.
      * @param array $params   A hash containing any additional configuration
index 92158e1..5e8eef4 100644 (file)
@@ -66,10 +66,10 @@ class IMP_Quota_sql extends IMP_Quota
     protected function _connect()
     {
         if (!$this->_connected) {
-            $this->_db = &DB::connect($this->_params,
-                                      array('persistent' => !empty($this->_params['persistent']),
-                                            'ssl' => !empty($this->_params['ssl'])));
-            if (is_a($this->_db, 'PEAR_Error')) {
+            $this->_db = DB::connect($this->_params,
+                                     array('persistent' => !empty($this->_params['persistent']),
+                                           'ssl' => !empty($this->_params['ssl'])));
+            if ($this->_db instanceof PEAR_Error) {
                 throw new Horde_Exception(_("Unable to connect to SQL server."));
             }
 
index 66f1177..04615a4 100644 (file)
@@ -99,7 +99,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) &&
@@ -229,7 +229,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);
             }
         }
@@ -334,7 +334,7 @@ class IMP_Search
             $this->_saveVFolderList($vfolders);
         }
 
-        $imaptree = &IMP_Imap_Tree::singleton();
+        $imaptree = IMP_Imap_Tree::singleton();
         $imaptree->insertVFolders(array($id => $label));
 
         return $id;
@@ -356,7 +356,7 @@ class IMP_Search
         }
 
         /* Create Virtual Trash with new folder list. */
-        $imp_folder = &IMP_Folder::singleton();
+        $imp_folder = IMP_Folder::singleton();
         $fl = $imp_folder->flist();
         $flist = array();
         foreach ($fl as $mbox) {
@@ -403,7 +403,7 @@ class IMP_Search
     public function createVINBOXFolder()
     {
         /* Initialize IMP_Imap_Tree. */
-        $imaptree = &IMP_Imap_Tree::singleton();
+        $imaptree = IMP_Imap_Tree::singleton();
 
         /* Delete the current Virtual Inbox folder, if it exists. */
         $vinbox_id = $GLOBALS['prefs']->getValue('vinbox_id');
index d4905cb..b210269 100644 (file)
@@ -200,7 +200,7 @@ class IMP_Session
         }
 
         /* Do login tasks. */
-        $tasks = &Horde_LoginTasks::singleton('imp', is_null($url) ? Horde::selfUrl(true, true, true) : $url);
+        $tasks = Horde_LoginTasks::singleton('imp', is_null($url) ? Horde::selfUrl(true, true, true) : $url);
         $tasks->runTasks();
 
         /* If the user wants to run filters on login, make sure they get
@@ -212,7 +212,7 @@ class IMP_Session
         }
 
         /* Check for drafts due to session timeouts. */
-        $imp_compose = &IMP_Compose::singleton();
+        $imp_compose = IMP_Compose::singleton();
         $imp_compose->recoverSessionExpireDraft();
 
         $_SESSION['imp']['logintasks'] = true;
index 1c5262b..72813aa 100644 (file)
@@ -41,7 +41,7 @@ class IMP_Spam
                 /* Fetch the raw message contents (headers and complete
                  * body). */
                 try {
-                    $imp_contents = &IMP_Contents::singleton($idx . IMP::IDX_SEP . $mbox);
+                    $imp_contents = IMP_Contents::singleton($idx . IMP::IDX_SEP . $mbox);
                 } catch (Horde_Exception $e) {
                     continue;
                 }
@@ -104,8 +104,8 @@ class IMP_Spam
 
                     if (!isset($imp_compose)) {
                         require_once 'Horde/Identity.php';
-                        $imp_compose = &IMP_Compose::singleton();
-                        $identity = &Identity::singleton(array('imp', 'imp'));
+                        $imp_compose = IMP_Compose::singleton();
+                        $identity = Identity::singleton(array('imp', 'imp'));
                         try {
                             $from_line = $identity->getFromLine();
                         } catch (Horde_Exception $e) {
@@ -170,7 +170,7 @@ class IMP_Spam
         /* Delete spam after report. */
         $delete_spam = $GLOBALS['prefs']->getValue('delete_spam_after_report');
         if ($delete_spam) {
-            $imp_message = &IMP_Message::singleton();
+            $imp_message = IMP_Message::singleton();
             switch ($delete_spam) {
             case 1:
                 if ($action == 'spam') {
index 283cd01..793525c 100644 (file)
@@ -15,7 +15,7 @@ class IMP_UI_Compose
 {
     /**
      */
-    function expandAddresses($input, $imp_compose)
+    public function expandAddresses($input, $imp_compose)
     {
         $result = $imp_compose->expandAddresses($this->getAddressList($input));
 
@@ -31,7 +31,7 @@ class IMP_UI_Compose
      *
      * @throws Horde_Exception
      */
-    function redirectMessage($to, $imp_compose, $contents, $encoding)
+    public function redirectMessage($to, $imp_compose, $contents, $encoding)
     {
         try {
             $recip = $imp_compose->recipientList(array('to' => $to));
@@ -40,7 +40,7 @@ class IMP_UI_Compose
         }
         $recipients = implode(', ', $recip['list']);
 
-        $identity = &Identity::singleton(array('imp', 'imp'));
+        $identity = Identity::singleton(array('imp', 'imp'));
         $from_addr = $identity->getFromAddress();
 
         $headers = $contents->getHeaderOb();
@@ -80,7 +80,7 @@ class IMP_UI_Compose
 
     /**
      */
-    function getForwardData(&$imp_compose, &$imp_contents, $index)
+    public function getForwardData(&$imp_compose, &$imp_contents, $index)
     {
         $fwd_msg = $imp_compose->forwardMessage($imp_contents);
         $subject_header = $imp_compose->attachIMAPMessage(array($index), $fwd_msg['headers']);
@@ -95,7 +95,7 @@ class IMP_UI_Compose
 
     /**
      */
-    function attachAutoCompleter($fields)
+    public function attachAutoCompleter($fields)
     {
         /* Attach autocompleters to the compose form elements. */
         foreach ($fields as $val) {
@@ -105,7 +105,7 @@ class IMP_UI_Compose
 
     /**
      */
-    function attachSpellChecker($mode, $add_br = false)
+    public function attachSpellChecker($mode, $add_br = false)
     {
         $menu_view = $GLOBALS['prefs']->getValue('menu_view');
         $show_text = ($menu_view == 'text' || $menu_view == 'both');
@@ -127,7 +127,7 @@ class IMP_UI_Compose
 
     /**
      */
-    function getAddressList($to, $to_list = array(), $to_field = array(),
+    public function getAddressList($to, $to_list = array(), $to_field = array(),
                             $to_new = '', $expand = false)
     {
         $to = rtrim(trim($to), ',');
@@ -169,9 +169,9 @@ class IMP_UI_Compose
 
     /**
      */
-    function initRTE($mode = 'imp', $editoronly = false)
+    public function initRTE($mode = 'imp', $editoronly = false)
     {
-        $editor = &Horde_Editor::singleton('Fckeditor', array('id' => 'message', 'no_notify' => true));
+        $editor = Horde_Editor::singleton('Fckeditor', array('id' => 'message', 'no_notify' => true));
         if ($editoronly) {
             return $editor;
         }
index 61c18bd..76603cb 100644 (file)
@@ -78,7 +78,7 @@ class IMP_UI_Mailbox
             $ret['from'] = _("Invalid Address");
             $ret['error'] = true;
         } else {
-            $identity = &Identity::singleton(array('imp', 'imp'));
+            $identity = Identity::singleton(array('imp', 'imp'));
             if ($identity->hasAddress($from['inner'])) {
                 /* This message was sent by one of the user's identity
                  * addresses - show To: information instead. */
index 44645af..d755606 100644 (file)
@@ -119,7 +119,7 @@ class IMP_UI_Message
             $success = true;
 
             if ($mdn_flag) {
-                $imp_message = &IMP_Message::singleton();
+                $imp_message = IMP_Message::singleton();
                 $imp_message->flag(array('$MDNSent'), $uid . IMP::IDX_SEP . $mailbox, true);
             }
         } catch (Horde_Mime_Exception $e) {
index 51b6800..d3c4ddc 100644 (file)
@@ -38,7 +38,7 @@ class IMP_Views_Compose
 
         /* Load Identity. */
         require_once 'Horde/Identity.php';
-        $identity = &Identity::singleton(array('imp', 'imp'));
+        $identity = Identity::singleton(array('imp', 'imp'));
         $selected_identity = $identity->getDefault();
         $sent_mail_folder = $identity->getValue('sent_mail_folder');
         if (!empty($sent_mail_folder)) {
@@ -68,7 +68,7 @@ class IMP_Views_Compose
 
         $composeCache = null;
         if (!empty($args['composeCache'])) {
-            $imp_compose = &IMP_Compose::singleton($args['composeCache']);
+            $imp_compose = IMP_Compose::singleton($args['composeCache']);
             $composeCache = $args['composeCache'];
 
             if ($imp_compose->numberOfAttachments()) {
index 91818c9..a808a39 100644 (file)
@@ -53,7 +53,7 @@ class IMP_Views_ListMessages
         }
 
         /* Generate the sorted mailbox list now. */
-        $imp_mailbox = &IMP_Mailbox::singleton($mbox);
+        $imp_mailbox = IMP_Mailbox::singleton($mbox);
         $sorted_list = $imp_mailbox->getSortedList();
         $msgcount = count($sorted_list['s']);
 
@@ -117,7 +117,7 @@ class IMP_Views_ListMessages
          * is a chance that the mailbox doesn't exist. If there is at least
          * 1 message, we don't need this check. */
         if (empty($msgcount) && !$is_search) {
-            $imp_folder = &IMP_Folder::singleton();
+            $imp_folder = IMP_Folder::singleton();
             if (!$imp_folder->exists($mbox)) {
                 $GLOBALS['notification']->push(sprintf(_("Mailbox %s does not exist."), $label), 'horde.error');
             }
@@ -192,7 +192,7 @@ class IMP_Views_ListMessages
 
         /* Get unseen/thread information. */
         if (!$is_search) {
-            $imptree = &IMP_Imap_Tree::singleton();
+            $imptree = IMP_Imap_Tree::singleton();
             $info = $imptree->getElementInfo($mbox);
             if (!empty($info)) {
                 $md->unseen = $info['unseen'];
@@ -251,7 +251,7 @@ class IMP_Views_ListMessages
                 $ob['flags'] = array_merge($ob['flags'], Horde::callHook('_imp_hook_msglist_flags', array($ob, 'dimp'), 'imp'));
             }
 
-            $imp_flags = &IMP_Imap_Flags::singleton();
+            $imp_flags = IMP_Imap_Flags::singleton();
             $flag_parse = $imp_flags->parse(array(
                 'atc' => isset($ob['structure']) ? $ob['structure'] : null,
                 'flags' => $ob['flags'],
index 93d3eb0..381cac4 100644 (file)
@@ -118,7 +118,7 @@ class IMP_Views_ShowMessage
 
         /* Parse MIME info and create the body of the message. */
         try {
-            $imp_contents = &IMP_Contents::singleton($index . IMP::IDX_SEP . $mailbox);
+            $imp_contents = IMP_Contents::singleton($index . IMP::IDX_SEP . $mailbox);
         } catch (Horde_Exception $e) {
             $result['error'] = $error_msg;
             $result['errortype'] = 'horde.error';
index 58f98e2..ce8efea 100644 (file)
@@ -257,7 +257,7 @@ function _imp_folderlist()
     require_once dirname(__FILE__) . '/base.php';
 
     if (IMP::checkAuthentication(true)) {
-        $imp_folder = &IMP_Folder::singleton();
+        $imp_folder = IMP_Folder::singleton();
         return $imp_folder->flist();
     }
 
@@ -277,7 +277,7 @@ function _imp_createFolder($folder)
     require_once dirname(__FILE__) . '/base.php';
 
     if (IMP::checkAuthentication(true)) {
-        $imp_folder = &IMP_Folder::singleton();
+        $imp_folder = IMP_Folder::singleton();
         return $imp_folder->create(IMP::appendNamespace($folder), $GLOBALS['prefs']->getValue('subscribe'));
     }
 
@@ -299,7 +299,7 @@ function _imp_deleteMessages($mailbox, $indices)
     require_once dirname(__FILE__) . '/base.php';
 
     if (IMP::checkAuthentication(true)) {
-        $imp_message = &IMP_Message::singleton();
+        $imp_message = IMP_Message::singleton();
         return $imp_message->delete(array($mailbox => $indices), array('nuke' => true));
     }
 
@@ -321,7 +321,7 @@ function _imp_copyMessages($mailbox, $indices, $target)
     require_once dirname(__FILE__) . '/base.php';
 
     if (IMP::checkAuthentication(true)) {
-        $imp_message = &IMP_Message::singleton();
+        $imp_message = IMP_Message::singleton();
         return $imp_message->copy($target, 'copy', array($mailbox => $indices), true);
     }
 
@@ -343,7 +343,7 @@ function _imp_moveMessages($mailbox, $indices, $target)
     require_once dirname(__FILE__) . '/base.php';
 
     if (IMP::checkAuthentication(true)) {
-        $imp_message = &IMP_Message::singleton();
+        $imp_message = IMP_Message::singleton();
         return $imp_message->copy($target, 'move', array($mailbox => $indices), true);
     }
 
@@ -366,7 +366,7 @@ function _imp_flagMessages($mailbox, $indices, $flags, $set)
     require_once dirname(__FILE__) . '/base.php';
 
     if (IMP::checkAuthentication(true)) {
-        $imp_message = &IMP_Message::singleton();
+        $imp_message = IMP_Message::singleton();
         return $imp_message->flag($flags, 'move', array($mailbox => $indices), $set);
     }
 
@@ -487,9 +487,9 @@ function _imp_changeLanguage()
     require_once dirname(__FILE__) . '/base.php';
 
     if (IMP::checkAuthentication(true)) {
-        $imp_folder = &IMP_Folder::singleton();
+        $imp_folder = IMP_Folder::singleton();
         $imp_folder->clearFlistCache();
-        $imaptree = &IMP_Imap_Tree::singleton();
+        $imaptree = IMP_Imap_Tree::singleton();
         $imaptree->init();
         $GLOBALS['imp_search']->sessionSetup(true);
     }
index 8f626a3..c7a3b9c 100644 (file)
@@ -54,7 +54,7 @@ case 'readonly':
     $s_ctrl = Registry::SESSION_READONLY;
     break;
 }
-$registry = &Registry::singleton($s_ctrl);
+$registry = Registry::singleton($s_ctrl);
 
 // We explicitly do not check application permissions for the compose
 // and login pages, since those are handled below and need to fall through
@@ -86,7 +86,7 @@ if (!Horde_Util::nonInputVar('no_compress')) {
 // that just timed out, store the draft.
 if (!(Auth::isAuthenticated() || (Auth::getProvider() == 'imp'))) {
     if ($compose_page) {
-        $imp_compose = &IMP_Compose::singleton();
+        $imp_compose = IMP_Compose::singleton();
         $imp_compose->sessionExpireDraft();
     }
     Horde::authenticationFailureRedirect();
@@ -106,7 +106,7 @@ if ($authentication !== 'none') {
     // are likely to trigger this case.
     if (empty($_SESSION['imp'])) {
         if ($compose_page) {
-            $imp_compose = &IMP_Compose::singleton();
+            $imp_compose = IMP_Compose::singleton();
             $imp_compose->sessionExpireDraft();
             require IMP_BASE . '/login.php';
         } else {
@@ -117,7 +117,7 @@ if ($authentication !== 'none') {
 
     if ($compose_page) {
         if (!IMP::checkAuthentication(true, ($authentication === 'horde'))) {
-            $imp_compose = &IMP_Compose::singleton();
+            $imp_compose = IMP_Compose::singleton();
             $imp_compose->sessionExpireDraft();
             require IMP_BASE . '/login.php';
             exit;
@@ -160,12 +160,12 @@ if (($viewmode == 'dimp') && Horde_Util::nonInputVar('dimp_logout')) {
 }
 
 // Notification system.
-$notification = &Horde_Notification::singleton();
+$notification = Horde_Notification::singleton();
 if (($viewmode == 'mimp') ||
     (Horde_Util::nonInputVar('login_page') && $GLOBALS['browser']->isMobile())) {
-    $GLOBALS['imp_notify'] = &$notification->attach('status', null, 'Horde_Notification_Listener_Mobile');
+    $GLOBALS['imp_notify'] = $notification->attach('status', null, 'Horde_Notification_Listener_Mobile');
 } else {
-    $GLOBALS['imp_notify'] = &$notification->attach('status', array('viewmode' => $viewmode), 'IMP_Notification_Listener_Status');
+    $GLOBALS['imp_notify'] = $notification->attach('status', array('viewmode' => $viewmode), 'IMP_Notification_Listener_Status');
     if ($viewmode == 'imp') {
         $notification->attach('audio');
     }
index 74a2644..9607848 100644 (file)
@@ -26,7 +26,7 @@ function handle_sentmailselect($updated)
             $sent_mail_folder = IMP::appendNamespace($sent_mail_default);
         }
         if (!empty($sent_mail_folder)) {
-            $imp_folder = &IMP_Folder::singleton();
+            $imp_folder = IMP_Folder::singleton();
             if (!$imp_folder->exists($sent_mail_folder)) {
                 $imp_folder->create($sent_mail_folder, $prefs->getValue('subscribe'));
             }
@@ -51,7 +51,7 @@ function handlefolders($updated, $pref, $folder, $new)
             } else {
                 if (empty($folder) && !empty($new)) {
                     $folder = IMP::appendNamespace($new);
-                    $imp_folder = &IMP_Folder::singleton();
+                    $imp_folder = IMP_Folder::singleton();
                     if (!$imp_folder->create($folder, $prefs->getValue('subscribe'))) {
                         $folder = null;
                     }
@@ -158,7 +158,7 @@ function handle_soundselect($updated)
 
 function handle_flagmanagement($updated)
 {
-    $imp_flags = &IMP_Imap_Flags::singleton();
+    $imp_flags = IMP_Imap_Flags::singleton();
     $action = Horde_Util::getFormData('flag_action');
     $data = Horde_Util::getFormData('flag_data');
 
@@ -222,9 +222,9 @@ function prefs_callback()
     }
 
     if ($prefs->isDirty('subscribe') || $prefs->isDirty('tree_view')) {
-        $imp_folder = &IMP_Folder::singleton();
+        $imp_folder = IMP_Folder::singleton();
         $imp_folder->clearFlistCache();
-        $imaptree = &IMP_Imap_Tree::singleton();
+        $imaptree = IMP_Imap_Tree::singleton();
         $imaptree->init();
     }
 
index 5b233b1..9beafc1 100644 (file)
@@ -38,7 +38,7 @@ case 'm':
 // 'e' = expunge mailbox
 case 'e':
     if (!$readonly) {
-        $imp_message = &IMP_Message::singleton();
+        $imp_message = IMP_Message::singleton();
         $imp_message->expungeMailbox(array($imp_mbox['mailbox'] => 1));
     }
     break;
@@ -53,7 +53,7 @@ case 'c':
 $mailbox_url = IMP::generateIMPUrl('mailbox-mimp.php', $imp_mbox['mailbox']);
 
 /* Build the list of messages in the mailbox. */
-$imp_mailbox = &IMP_Mailbox::singleton($imp_mbox['mailbox']);
+$imp_mailbox = IMP_Mailbox::singleton($imp_mbox['mailbox']);
 $pageOb = $imp_mailbox->buildMailboxPage(Horde_Util::getFormData('p'), Horde_Util::getFormData('s'));
 
 /* Generate page links. */
@@ -106,7 +106,7 @@ while (list(,$ob) = each($mbox_info['overview'])) {
     }
 
     /* Get flag information. */
-    $imp_flags = &IMP_Imap_Flags::singleton();
+    $imp_flags = IMP_Imap_Flags::singleton();
     $flag_parse = $imp_flags->parse(array(
         'flags' => $ob['flags'],
         'personal' => Horde_Mime_Address::getAddressesFromObject($ob['envelope']['to']),
index b12b1d4..092163f 100644 (file)
@@ -141,14 +141,14 @@ case 'fwd_digest':
 
 case 'delete_messages':
     if (!empty($indices)) {
-        $imp_message = &IMP_Message::singleton();
+        $imp_message = IMP_Message::singleton();
         $imp_message->delete($indices);
     }
     break;
 
 case 'undelete_messages':
     if (!empty($indices)) {
-        $imp_message = &IMP_Message::singleton();
+        $imp_message = IMP_Message::singleton();
         $imp_message->undelete($indices);
     }
     break;
@@ -156,7 +156,7 @@ case 'undelete_messages':
 case 'move_messages':
 case 'copy_messages':
     if (!empty($indices) && !empty($targetMbox)) {
-        $imp_message = &IMP_Message::singleton();
+        $imp_message = IMP_Message::singleton();
         if (!empty($newMbox) && ($newMbox == 1)) {
             $targetMbox = IMP::folderPref($targetMbox, true);
             $newMbox = true;
@@ -175,7 +175,7 @@ case 'flag_messages':
             $flag = substr($flag, 1);
             $set = false;
         }
-        $imp_message = &IMP_Message::singleton();
+        $imp_message = IMP_Message::singleton();
         $imp_message->flag(array($flag), $indices, $set);
     }
     break;
@@ -186,7 +186,7 @@ case 'hide_deleted':
     break;
 
 case 'expunge_mailbox':
-    $imp_message = &IMP_Message::singleton();
+    $imp_message = IMP_Message::singleton();
     $imp_message->expungeMailbox(array($imp_mbox['mailbox'] => 1));
     break;
 
@@ -195,7 +195,7 @@ case 'filter':
     break;
 
 case 'empty_mailbox':
-    $imp_message = &IMP_Message::singleton();
+    $imp_message = IMP_Message::singleton();
     $imp_message->emptyMailbox(array($imp_mbox['mailbox']));
     break;
 
@@ -489,7 +489,7 @@ if (empty($pageOb['end'])) {
     exit;
 }
 
-$imp_flags = &IMP_Imap_Flags::singleton();
+$imp_flags = IMP_Imap_Flags::singleton();
 
 /* Display the navbar and actions if there is at least 1 message in mailbox. */
 if ($pageOb['msgcount']) {
index 4dca5f7..d8f47fc 100644 (file)
 require_once dirname(__FILE__) . '/lib/base.php';
 
 /* Make sure we have a valid index. */
-$imp_mailbox = &IMP_Mailbox::singleton($imp_mbox['mailbox'], $imp_mbox['index']);
+$imp_mailbox = IMP_Mailbox::singleton($imp_mbox['mailbox'], $imp_mbox['index']);
 if (!$imp_mailbox->isValidIndex(false)) {
     header('Location: ' . Horde_Util::addParameter(IMP::generateIMPUrl('mailbox-mimp.php', $imp_mbox['mailbox']), array('a' => 'm'), null, false));
     exit;
 }
 
 /* Initialize IMP_Message object. */
-$imp_message = &IMP_Message::singleton();
+$imp_message = IMP_Message::singleton();
 
 /* Determine if mailbox is readonly. */
 $readonly = $imp_imap->isReadOnly($imp_mbox['mailbox']);
@@ -113,7 +113,7 @@ $use_pop = ($_SESSION['imp']['protocol'] == 'pop');
 
 /* Parse the message. */
 try {
-    $imp_contents = &IMP_Contents::singleton($index . IMP::IDX_SEP . $mailbox_name);
+    $imp_contents = IMP_Contents::singleton($index . IMP::IDX_SEP . $mailbox_name);
 } catch (Horde_Exception $e) {
     header('Location: ' . Horde_Util::addParameter(IMP::generateIMPUrl('mailbox-mimp.php', $mailbox_name), array('a' => 'm'), null, false));
     exit;
@@ -154,7 +154,7 @@ $imp_ui = new IMP_UI_Message();
 
 /* Create the Identity object. */
 require_once 'Horde/Identity.php';
-$user_identity = &Identity::singleton(array('imp', 'imp'));
+$user_identity = Identity::singleton(array('imp', 'imp'));
 
 /* Develop the list of headers to display. */
 $basic_headers = $imp_ui->basicHeaders();
@@ -215,7 +215,7 @@ if (!empty($msgAddresses)) {
     }
 }
 
-$imp_flags = &IMP_Imap_Flags::singleton();
+$imp_flags = IMP_Imap_Flags::singleton();
 $flag_parse = $imp_flags->parse(array(
     'flags' => $flags,
     'personal' => $match_identity
index 6c1c8e8..cc7238c 100644 (file)
@@ -36,7 +36,7 @@ if (!$imp_search->isSearchMbox($imp_mbox['mailbox'])) {
 }
 
 /* Make sure we have a valid index. */
-$imp_mailbox = &IMP_Mailbox::singleton($imp_mbox['mailbox'], $imp_mbox['index']);
+$imp_mailbox = IMP_Mailbox::singleton($imp_mbox['mailbox'], $imp_mbox['index']);
 if (!$imp_mailbox->isValidIndex(false)) {
     _returnToMailbox(null, 'message_missing');
     require IMP_BASE . '/mailbox.php';
@@ -44,14 +44,14 @@ if (!$imp_mailbox->isValidIndex(false)) {
 }
 
 /* Initialize IMP_Message object. */
-$imp_message = &IMP_Message::singleton();
+$imp_message = IMP_Message::singleton();
 
 /* Set the current time zone. */
 NLS::setTimeZone();
 
 /* Initialize the user's identities. */
 require_once 'Horde/Identity.php';
-$user_identity = &Identity::singleton(array('imp', 'imp'));
+$user_identity = Identity::singleton(array('imp', 'imp'));
 
 /* Run through action handlers. */
 $actionID = Horde_Util::getFormData('actionID');
@@ -200,7 +200,7 @@ $mailbox_name = $index_array['mailbox'];
 
 /* Parse the message. */
 try {
-    $imp_contents = &IMP_Contents::singleton($index . IMP::IDX_SEP . $mailbox_name);
+    $imp_contents = IMP_Contents::singleton($index . IMP::IDX_SEP . $mailbox_name);
 } catch (Horde_Exception $e) {
     $imp_mailbox->removeMsgs(true);
     _returnToMailbox(null, 'message_missing');
@@ -385,7 +385,7 @@ $mailbox_url = Horde_Util::addParameter(IMP::generateIMPUrl('mailbox.php', $imp_
 /* Generate the view link. */
 $view_link = IMP::generateIMPUrl('view.php', $imp_mbox['mailbox'], $index, $mailbox_name);
 
-$imp_flags = &IMP_Imap_Flags::singleton();
+$imp_flags = IMP_Imap_Flags::singleton();
 
 /* Everything below here is related to preparing the output. */
 if (!IMP::$printMode) {
index f2b1426..97c979f 100644 (file)
@@ -63,7 +63,7 @@ function _textWindowOutput($filename, $msg)
 
 function _reloadWindow()
 {
-    $cacheSess = &Horde_SessionObjects::singleton();
+    $cacheSess = Horde_SessionObjects::singleton();
     $reload = Horde_Util::getFormData('reload');
     $cacheSess->setPruneFlag($reload, true);
     Horde_Util::closeWindowJS('opener.focus();opener.location.href="' . $cacheSess->query($reload) . '";');
@@ -259,7 +259,7 @@ case 'save_options':
 case 'save_attachment_public_key':
     /* Retrieve the key from the message. */
     try {
-        $contents = &IMP_Contents::singleton(Horde_Util::getFormData('uid') . IMP::IDX_SEP . Horde_Util::getFormData('mailbox'));
+        $contents = IMP_Contents::singleton(Horde_Util::getFormData('uid') . IMP::IDX_SEP . Horde_Util::getFormData('mailbox'));
     } catch (Horde_Exception $e) {
         Horde::fatal($e, __FILE__, __LINE__);
     }
@@ -358,7 +358,7 @@ if ($prefs->getValue('use_pgp')) {
     if (!$t->get('no_file_upload')) {
         $t->set('no_source', !$GLOBALS['prefs']->getValue('add_source'));
         if (!$t->get('no_source')) {
-            $cacheSess = &Horde_SessionObjects::singleton();
+            $cacheSess = Horde_SessionObjects::singleton();
             $t->set('public_import_url', Horde_Util::addParameter(Horde_Util::addParameter($selfURL, 'actionID', 'import_public_key'), 'reload', $cacheSess->storeOid($selfURL, false)));
             $t->set('import_pubkey-help', Horde_Help::link('imp', 'pgp-import-pubkey'));
         }
@@ -382,7 +382,7 @@ if ($prefs->getValue('use_pgp')) {
             $t->set('personalkey-delete-help', Horde_Help::link('imp', 'pgp-personalkey-delete'));
         } else {
             require_once 'Horde/Identity.php';
-            $imp_identity = &Identity::singleton(array('imp', 'imp'));
+            $imp_identity = Identity::singleton(array('imp', 'imp'));
             $t->set('fullname', $imp_identity->getFullname());
             $t->set('personalkey-create-name-help', Horde_Help::link('imp', 'pgp-personalkey-create-name'));
             $t->set('personalkey-create-comment-help', Horde_Help::link('imp', 'pgp-personalkey-create-comment'));
index 21397cc..668b037 100644 (file)
@@ -38,7 +38,7 @@ if (!empty($request)) {
         $mailbox = IMP::appendNamespace(preg_replace('/\//', $ns_info['delimiter'], trim($request_parts[0], '/')));
 
         /* Make sure mailbox exists or else exit immediately. */
-        $imp_folder = &IMP_Folder::singleton();
+        $imp_folder = IMP_Folder::singleton();
         if (!$imp_folder->exists($mailbox)) {
             exit;
         }
@@ -47,7 +47,7 @@ if (!empty($request)) {
 }
 
 /* Obtain some information describing the mailbox state. */
-$imp_mailbox = &IMP_Mailbox::singleton($mailbox);
+$imp_mailbox = IMP_Mailbox::singleton($mailbox);
 $total_num = $imp_mailbox->getMessageCount();
 $unseen_num = ($imp_search->isVINBOXFolder($mailbox))
     ? $imp_mailbox->getMessageCount()
index 2d659fc..2e4ec53 100644 (file)
@@ -18,7 +18,7 @@ $index = Horde_Util::getFormData('index');
 $actionID = Horde_Util::getFormData('actionID');
 switch ($actionID) {
 case 'save_image':
-    $contents = &IMP_Contents::singleton($index);
+    $contents = IMP_Contents::singleton($index);
     $mime_part = $contents->getMIMEPart($id);
     $image_data = array(
         'filename' => $mime_part->getName(true),
index 08d0202..7caa1f5 100644 (file)
@@ -306,7 +306,7 @@ if (empty($search['mbox'])) {
     $mboxes = array();
     $newcol = $numcolumns = 1;
 
-    $imp_folder = &IMP_Folder::singleton();
+    $imp_folder = IMP_Folder::singleton();
     $mailboxes = $imp_folder->flist(array(), !is_null($shown) ? $shown : null);
     $total = ceil(count($mailboxes) / 3);
 
index 998094b..3d9d7b6 100644 (file)
@@ -47,14 +47,14 @@ function _getImportKey()
 function _actionWindow()
 {
     $oid = Horde_Util::getFormData('passphrase_action');
-    $cacheSess = &Horde_SessionObjects::singleton();
+    $cacheSess = Horde_SessionObjects::singleton();
     $cacheSess->setPruneFlag($oid, true);
     Horde_Util::closeWindowJS($cacheSess->query($oid));
 }
 
 function _reloadWindow()
 {
-    $cacheSess = &Horde_SessionObjects::singleton();
+    $cacheSess = Horde_SessionObjects::singleton();
     $reload = Horde_Util::getFormData('reload');
     $cacheSess->setPruneFlag($reload, true);
     Horde_Util::closeWindowJS('opener.focus();opener.location.href="' . $cacheSess->query($reload) . '";');
@@ -179,7 +179,7 @@ case 'process_import_personal_certs':
 case 'save_attachment_public_key':
     /* Retrieve the key from the message. */
     try {
-        $contents = &IMP_Contents::singleton(Horde_Util::getFormData('uid') . IMP::IDX_SEP . Horde_Util::getFormData('mailbox'));
+        $contents = IMP_Contents::singleton(Horde_Util::getFormData('uid') . IMP::IDX_SEP . Horde_Util::getFormData('mailbox'));
     } catch (Horde_Exception $e) {
         Horde::fatal($e, __FILE__, __LINE__);
     }
@@ -276,7 +276,7 @@ if ($openssl_check && $prefs->getValue('use_smime')) {
     if (!$t->get('no_file_upload')) {
         $t->set('no_source', !$GLOBALS['prefs']->getValue('add_source'));
         if (!$t->get('no_source')) {
-            $cacheSess = &Horde_SessionObjects::singleton();
+            $cacheSess = Horde_SessionObjects::singleton();
             $t->set('public_import_url', Horde_Util::addParameter(Horde_Util::addParameter($selfURL, 'actionID', 'import_public_key'), 'reload', $cacheSess->storeOid($selfURL, false)));
             $t->set('import_pubkey-help', Horde_Help::link('imp', 'smime-import-pubkey'));
         }
index f5e3b8d..ad708b6 100644 (file)
@@ -90,7 +90,7 @@ if ($updated) {
 }
 
 if ($stationery['t'] == 'html') {
-    $editor = &Horde_Editor::singleton('Fckeditor', array('id' => 'content'));
+    $editor = Horde_Editor::singleton('Fckeditor', array('id' => 'content'));
 }
 
 /* Show the header. */
index 86be4cd..47be0f3 100644 (file)
@@ -25,7 +25,7 @@ foreach ($rows as $val) {
     $t->set('linebreaks', true);
 }
 
-$menu = &new Horde_Mobile_card('o', _("Menu"));
+$menu = new Horde_Mobile_card('o', _("Menu"));
 $mset = &$menu->add(new Horde_Mobile_linkset());
 $mset->add(new Horde_Mobile_link(_("Refresh"), $selfurl));
 if ($subscribe) {
index 5fa96ea..8df17d6 100644 (file)
@@ -17,7 +17,7 @@ $sidebar_width = max((int)$prefs->getValue('sidebar_width') - 50, 150) . 'px';
 $show_quota = (isset($_SESSION['imp']['quota']) && is_array($_SESSION['imp']['quota']));
 
 // Get the list of available IMAP flags
-$imp_flags = &IMP_Imap_Flags::singleton();
+$imp_flags = IMP_Imap_Flags::singleton();
 $flag_list = $imp_flags->getList(array('imap' => true));
 
 // Small utility functions to simplify creating dimpactions buttons.
index 8cbc561..013b8a8 100644 (file)
@@ -28,7 +28,7 @@ foreach ($dimp_block_list as $block) {
 }
 
 /* Generate flag array. */
-$imp_flags = &IMP_Imap_Flags::singleton();
+$imp_flags = IMP_Imap_Flags::singleton();
 foreach ($imp_flags->getList() as $val) {
     $flags[$val['flag']] = array_filter(array(
         'b' => isset($val['b']) ? $val['b'] : null,
index 02f80af..20d899b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* Get the list of flags. */
-$imp_flags = &IMP_Imap_Flags::singleton();
+$imp_flags = IMP_Imap_Flags::singleton();
 $flaglist = $imp_flags->getList(array('div' => true, 'fgcolor' => true));
 
 /* Get the graphics. */
index 70910cf..1e2fc67 100644 (file)
@@ -17,7 +17,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
  */
 $mode = Horde_Util::getFormData('mode', 'thread');
 
-$imp_mailbox = &IMP_Mailbox::singleton($imp_mbox['mailbox'], $imp_mbox['index']);
+$imp_mailbox = IMP_Mailbox::singleton($imp_mbox['mailbox'], $imp_mbox['index']);
 
 $error = false;
 if ($mode == 'thread') {
@@ -88,7 +88,7 @@ foreach ($loop_array as $mbox => $idxlist) {
 
         /* Get the body of the message. */
         $curr_msg = $curr_tree = array();
-        $contents = &IMP_Contents::singleton($idx . IMP::IDX_SEP . $mbox);
+        $contents = IMP_Contents::singleton($idx . IMP::IDX_SEP . $mbox);
         $mime_id = $contents->findBody();
         if ($contents->canDisplay($mime_id, IMP_Contents::RENDER_INLINE)) {
             $ret = $contents->renderMIMEPart($mime_id, IMP_Contents::RENDER_INLINE);
@@ -138,7 +138,7 @@ foreach ($loop_array as $mbox => $idxlist) {
 }
 
 /* Flag messages as seen. */
-$imp_message = &IMP_Message::singleton();
+$imp_message = IMP_Message::singleton();
 $imp_message->flag(array('\\seen'), $loop_array);
 
 $template = new IMP_Template();