simple patch to try to fix the session error.
authorBarış Metin <Talip-Baris.Metin@sophia.inria.fr>
Thu, 9 Apr 2009 13:42:08 +0000 (13:42 +0000)
committerBarış Metin <Talip-Baris.Metin@sophia.inria.fr>
Thu, 9 Apr 2009 13:42:08 +0000 (13:42 +0000)
planetlab/includes/plc_session.php

index 91fb247..1afbc7a 100644 (file)
@@ -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());
+  }
+}
+
 ?>