X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsignout.php;h=d7258a77c2c50c9fbaebf159bc9daabb9e1ff00e;hb=ed9f3a67e3668c232994f4a69c045e6f3b6eba72;hp=d23997ce6b87e0b84e4eef47db157c7ec0653fb6;hpb=8437bc78ef8ab67507e83a6c219835e729e7b240;p=squirrelmail.git diff --git a/src/signout.php b/src/signout.php index d23997ce..d7258a77 100644 --- a/src/signout.php +++ b/src/signout.php @@ -11,28 +11,23 @@ ** $Id$ **/ - session_start(); + include('../src/validate.php'); + include ('../functions/prefs.php'); + include ('../functions/plugin.php'); - if (!isset($strings_php)) - include('../functions/strings.php'); - - include ('../src/load_prefs.php'); - - if (!isset($config_php)) - include('../config/config.php'); - if (!isset($i18n_php)) - include('../functions/i18n.php'); - if (!isset($prefs_php)) - include ('../functions/prefs.php'); - if (!isset($plugin_php)) - include ('../functions/plugin.php'); - - set_up_language(getPref($data_dir, $username, 'language')); + // Erase any lingering attachments + if (! isset($attachments)) { + $attachments = array(); + } + foreach ($attachments as $info) { + if (file_exists($attachment_dir . $info['localfilename'])) { + unlink($attachment_dir . $info['localfilename']); + } + } // 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]; } @@ -40,23 +35,28 @@ 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. */ + } ?> - + <?php echo $org_title ?> - Signout +LINK="" VLINK="" +ALINK="">

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