From: <pdo...@us...> - 2007-08-28 20:39:41
|
Revision: 12615 http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=12615&view=rev Author: pdontthink Date: 2007-08-28 13:39:36 -0700 (Tue, 28 Aug 2007) Log Message: ----------- Fix single-page session restores; change restore mechanism to use PAGE_NAME Modified Paths: -------------- branches/SM-1_4-STABLE/squirrelmail/src/redirect.php Modified: branches/SM-1_4-STABLE/squirrelmail/src/redirect.php =================================================================== --- branches/SM-1_4-STABLE/squirrelmail/src/redirect.php 2007-08-28 20:30:29 UTC (rev 12614) +++ branches/SM-1_4-STABLE/squirrelmail/src/redirect.php 2007-08-28 20:39:36 UTC (rev 12615) @@ -144,15 +144,17 @@ if ( sqgetGlobalVar('session_expired_location', $session_expired_location, SQ_SESSION) ) { sqsession_unregister('session_expired_location'); - if ( strpos($session_expired_location, 'compose.php') !== FALSE ) { + if ( $session_expired_location == 'compose' ) { $compose_new_win = getPref($data_dir, $username, 'compose_new_win', 0); if ($compose_new_win) { - $redirect_url = $session_expired_location; - } elseif ( strpos($session_expired_location, 'webmail.php') === FALSE ) { + // do not prefix $location here because $session_expired_location is set to the PAGE_NAME + // of the last page + $redirect_url = $session_expired_location.'.php'; + } elseif ( $session_expired_location != 'webmail' ) { $redirect_url = 'webmail.php?right_frame=compose.php'; } } else { - $redirect_url = 'webmail.php?right_frame=' . urlencode($session_expired_location); + $redirect_url = 'webmail.php?right_frame=' . urlencode($session_expired_location) . '.php'; } unset($session_expired_location); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |