From: Simon D. <si...@us...> - 2002-03-08 10:38:04
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory usw-pr-cvs1:/tmp/cvs-serv5090 Modified Files: auth.php Log Message: Make sure base_uri is correct (submitted by James Lewis) Index: auth.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/auth.php,v retrieving revision 1.18 retrieving revision 1.19 diff -u -w -r1.18 -r1.19 --- auth.php 22 Feb 2002 10:15:18 -0000 1.18 +++ auth.php 8 Mar 2002 10:11:33 -0000 1.19 @@ -13,6 +13,15 @@ require_once( '../functions/page_header.php' ); +/* If a user opens a new session then comes back to this one, + * $base_uri isn't set because it the session is invalid. + */ + +if (! isset($base_uri)) { + ereg ('(^.*/)[^/]+/[^/]+$', $PHP_SELF, $regs); + $base_uri = $regs[1]; +} + function is_logged_in () { global $squirrelmail_language, $frame_top, $base_uri; |