PAGE_NAME might not be defined in all plugins, which might cause a "not defined"...
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 31 Oct 2007 00:28:26 +0000 (00:28 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 31 Oct 2007 00:28:26 +0000 (00:28 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12748 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
functions/auth.php

index 5d2f092216c8b62cae836f3858e7350db9d34f07..c093b6ee5f05631a46acd3ffe71d9043ab872f14 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -225,6 +225,8 @@ Version 1.5.2 - SVN
   - Added a "short_open_tag" configuration test.
   - Fixed outgoing messages to allow addresses such as "0@..." or "000@...", 
     etc. (#1818398).
+  - PAGE_NAME might not be defined in all plugins, which might cause a
+    "not defined" error on session timeouts.
 
 Version 1.5.1 (branched on 2006-02-12)
 --------------------------------------
index b7d57452d8ce123f9d4ccbb79d3c165b566df618..ba8ff5d4835bf0e4aad7656904cfdb0be7277260 100644 (file)
@@ -34,19 +34,24 @@ function sqauth_is_logged_in() {
         return true;
     }
 
-       //  First we store some information in the new session to prevent
-       //  information-loss.
-       $session_expired_post = $_POST;
-       $session_expired_location = PAGE_NAME;
-       if (!sqsession_is_registered('session_expired_post')) {
-           sqsession_register($session_expired_post,'session_expired_post');
-       }
-       if (!sqsession_is_registered('session_expired_location')) {
-           sqsession_register($session_expired_location,'session_expired_location');
-       }
-       session_write_close();
+    //  First we store some information in the new session to prevent
+    //  information-loss.
+    $session_expired_post = $_POST;
+    if (defined('PAGE_NAME'))
+        $session_expired_location = PAGE_NAME;
+    else
+        $session_expired_location = '';
 
-       return false;
+    if (!sqsession_is_registered('session_expired_post')) {
+        sqsession_register($session_expired_post,'session_expired_post');
+    }
+    if (!sqsession_is_registered('session_expired_location')) {
+        sqsession_register($session_expired_location,'session_expired_location');
+    }
+
+    session_write_close();
+
+    return false;
 }
 
 /**