From 1dd14044c41986f27152e1bedabb8b6631ebc79b Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Sun, 7 Jun 2009 15:31:08 -0400 Subject: [PATCH] Fix _imp_server() to get the servername from the imap_ob --- imp/lib/api.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/imp/lib/api.php b/imp/lib/api.php index 6c298fe29..9afd8b22c 100644 --- a/imp/lib/api.php +++ b/imp/lib/api.php @@ -438,9 +438,12 @@ function _imp_server() $GLOBALS['authentication'] = 'none'; require_once dirname(__FILE__) . '/base.php'; - return IMP::checkAuthentication(true) - ? $_SESSION['imp']['server'] - : null; + if (IMP::checkAuthentication(true)) { + $imap_obj = unserialize($_SESSION['imp']['imap_ob']); + return $imap_obj->getParam('hostspec'); + } else { + return null; + } } /** -- 2.11.0