X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsignout.php;h=6b54cc4ec8be3aaf08742134cac02e92a3262140;hb=503a49a4ade2e96d3365e1d0205d05a6763a74b3;hp=68ef0ce1bf1dc3375a5a7d995c9eb0b41ca53794;hpb=5c263f271f52ac690c0afc762b5af700b44296ee;p=squirrelmail.git diff --git a/src/signout.php b/src/signout.php index 68ef0ce1..6b54cc4e 100644 --- a/src/signout.php +++ b/src/signout.php @@ -11,32 +11,23 @@ ** $Id$ **/ - 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'); - + require_once('../src/validate.php'); + require_once('../functions/prefs.php'); + require_once('../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">
+
@@ -84,4 +81,4 @@ CELLPADDING="2" ALIGN="CENTER">
- + \ No newline at end of file