From: Barış Metin Date: Thu, 9 Apr 2009 13:42:08 +0000 (+0000) Subject: simple patch to try to fix the session error. X-Git-Tag: PLEWWW-4.3-5~2 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=d173b6a4869bc60527b3c89ca0b6527ef8ee9bdf;p=plewww.git simple patch to try to fix the session error. --- diff --git a/planetlab/includes/plc_session.php b/planetlab/includes/plc_session.php index 91fb247..1afbc7a 100644 --- a/planetlab/includes/plc_session.php +++ b/planetlab/includes/plc_session.php @@ -23,6 +23,10 @@ require_once 'plc_config.php'; // Usually in /usr/share/plc_api/php require_once 'plc_api.php'; + +require_once 'plc_functions.php'; + + $cwd = getcwd(); chdir($_SERVER['DOCUMENT_ROOT']); $included = include_once('./includes/bootstrap.inc'); @@ -155,4 +159,11 @@ if (!empty($_SESSION['plc'])) { // For convenience $api = $plc->api; +if ($api && $api->AuthCheck() != 1) { + $current_pagename = basename($_SERVER['PHP_SELF']); + if ($current_pagename != basename(l_logout())) { + plc_redirect(l_logout()); + } +} + ?>