[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-cvs
Subject:    [SM-CVS] CVS: squirrelmail/src signout.php,1.72,1.73
From:       Thijs Kinkhorst <kink () users ! sourceforge ! net>
Date:       2004-11-21 13:50:39
Message-ID: E1CVs6x-0004mA-AP () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/squirrelmail/squirrelmail/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18180/src

Modified Files:
	signout.php 
Log Message:
When you reload signout.php you get an error that you have to be logged in
to view the signout page. This is of course silly, if you're already logged
out this page should be a 'no-op' that just presents the same message.


Index: signout.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/src/signout.php,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -w -r1.72 -r1.73
--- signout.php	2 Nov 2004 22:21:34 -0000	1.72
+++ signout.php	21 Nov 2004 13:50:36 -0000	1.73
@@ -18,13 +18,31 @@
  */
 define('SM_PATH','../');
 
-/* SquirrelMail required files. */
+/* check if we're already logged out (e.g. when this page is reloaded),
+ * so we can skip to the output and not give error messages */
+if( ! isset($_SESSION) || empty($_SESSION['user_is_logged_in']) ) {
+    $loggedin = false;
+} else {
+    $loggedin = true;
+}
+
+if($loggedin) {
 require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/prefs.php');
+} else {
+    // this comes in through validate.php usually
+    require_once(SM_PATH . 'config/config.php');
+    require_once(SM_PATH . 'functions/i18n.php');
+    require_once(SM_PATH . 'functions/page_header.php');
+    if (@file_exists($theme[$theme_default]['PATH'])) {
+        @include ($theme[$theme_default]['PATH']);
+    }
+}
 require_once(SM_PATH . 'functions/plugin.php');
 require_once(SM_PATH . 'functions/strings.php');
 require_once(SM_PATH . 'functions/html.php');
 
+if($loggedin) {
 /* Erase any lingering attachments */
 if (isset($attachments) && is_array($attachments)
     && sizeof($attachments)){
@@ -36,6 +54,7 @@
         }
     }
 }
+}
 
 if (!isset($frame_top)) {
     $frame_top = '_top';



-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
--
squirrelmail-cvs mailing list
List Address: squirrelmail-cvs@lists.sourceforge.net
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
http://squirrelmail.org/cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic