X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fsignout.php;h=d7258a77c2c50c9fbaebf159bc9daabb9e1ff00e;hp=68ef0ce1bf1dc3375a5a7d995c9eb0b41ca53794;hb=cf6df86f2c2a324311683edd44e657c9e75d0990;hpb=5c263f271f52ac690c0afc762b5af700b44296ee diff --git a/src/signout.php b/src/signout.php index 68ef0ce1..d7258a77 100644 --- a/src/signout.php +++ b/src/signout.php @@ -12,31 +12,22 @@ **/ include('../src/validate.php'); - include('../functions/strings.php'); - include ('../src/load_prefs.php'); - include('../config/config.php'); - include('../functions/i18n.php'); include ('../functions/prefs.php'); include ('../functions/plugin.php'); - // Erase any lingering attachments - if (! isset($attachments)) + if (! isset($attachments)) { $attachments = array(); - foreach ($attachments as $info) - { - if (file_exists($attachment_dir . $info['localfilename'])) - { + } + foreach ($attachments as $info) { + if (file_exists($attachment_dir . $info['localfilename'])) { unlink($attachment_dir . $info['localfilename']); } } - set_up_language(getPref($data_dir, $username, 'language')); - // If a user hits reload on the last page, $base_uri isn't set // because it was deleted with the session. - if (! isset($base_uri)) - { + if (! isset($base_uri)) { ereg ("(^.*/)[^/]+/[^/]+$", $PHP_SELF, $regs); $base_uri = $regs[1]; } @@ -44,8 +35,13 @@ do_hook('logout'); setcookie('username', '', 0, $base_uri); setcookie('key', '', 0, $base_uri); - setcookie('logged_in', '', 0, $base_uri); session_destroy(); + + if ($signout_page) { + header("Status: 303 See Other"); + header("Location: $signout_page"); + exit; /* we send no content if we're redirecting. */ + } ?> @@ -59,8 +55,8 @@ <?php echo $org_title ?> - Signout +LINK="" VLINK="" +ALINK="">

@@ -71,6 +67,7 @@ CELLPADDING="2" ALIGN="CENTER">
+