diff --git a/control.php b/control.php index cbae881..2262786 100644 --- a/control.php +++ b/control.php @@ -53,7 +53,8 @@ $action = $_REQUEST['action']; if ($action != "login") { // check the session, but don't redirect if the check fails - if (checkSessionAndRedirect(false)) { + $ret = checkSessionAndRedirect(false); + if ($ret === true) { //get around the problem with search if (strcmp($_REQUEST['fForStandardSearch'], "yes") == 0) { $action = "standardSearch"; @@ -77,6 +78,9 @@ if ($action != "login") { if ((strlen($redirect) > 1)) { $url = $url . "&redirect=" . $redirect; } + if (PEAR::isError($ret)) { + $url = $url . "&errorMessage=" . urlencode($ret->getMessage()); + } redirect($url); exit(0); } diff --git a/lib/session/control.inc b/lib/session/control.inc index 2255de9..3f89dec 100644 --- a/lib/session/control.inc +++ b/lib/session/control.inc @@ -137,7 +137,7 @@ function checkSessionAndRedirect($bRedirect, $bDownload = false) { // verification failed $default->log->debug("checkSession:: session check failed"); if (empty($bRedirect)) { - return false; + return $sessionStatus; } $sErrorMessage = "";