From 5649ff77fef348c3dd2b92ff6558649feb6be014 Mon Sep 17 00:00:00 2001 From: nbm Date: Thu, 20 Jul 2006 14:09:40 +0000 Subject: [PATCH] Propogate session error messages in control.php --- control.php | 6 +++++- lib/session/control.inc | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) 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 = ""; -- libgit2 0.21.4