projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed more warnings
[squirrelmail.git]
/
src
/
signout.php
diff --git
a/src/signout.php
b/src/signout.php
index 68ef0ce1bf1dc3375a5a7d995c9eb0b41ca53794..d7258a77c2c50c9fbaebf159bc9daabb9e1ff00e 100644
(file)
--- a/
src/signout.php
+++ b/
src/signout.php
@@
-12,31
+12,22
@@
**/
include('../src/validate.php');
**/
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');
include ('../functions/prefs.php');
include ('../functions/plugin.php');
-
// Erase any lingering attachments
// Erase any lingering attachments
- if (! isset($attachments))
+ if (! isset($attachments))
{
$attachments = array();
$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']);
}
}
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 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];
}
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);
do_hook('logout');
setcookie('username', '', 0, $base_uri);
setcookie('key', '', 0, $base_uri);
- setcookie('logged_in', '', 0, $base_uri);
session_destroy();
session_destroy();
+
+ if ($signout_page) {
+ header("Status: 303 See Other");
+ header("Location: $signout_page");
+ exit; /* we send no content if we're redirecting. */
+ }
?>
<HTML>
<HEAD>
?>
<HTML>
<HEAD>
@@
-59,8
+55,8
@@
<TITLE><?php echo $org_title ?> - Signout</TITLE>
</HEAD>
<BODY TEXT="<?php echo $color[8] ?>" BGCOLOR="<?php echo $color[4] ?>"
<TITLE><?php echo $org_title ?> - Signout</TITLE>
</HEAD>
<BODY TEXT="<?php echo $color[8] ?>" BGCOLOR="<?php echo $color[4] ?>"
-LINK="<?php echo $color[7] ?>" VLINK="<?php echo $color[7] ?>"
A
-LINK="<?php echo $color[7] ?>">
+LINK="<?php echo $color[7] ?>" VLINK="<?php echo $color[7] ?>"
+
A
LINK="<?php echo $color[7] ?>">
<BR><BR>
<TABLE BGCOLOR="FFFFFF" BORDER="0" COLS="1" WIDTH="50%" CELLSPACING="0"
CELLPADDING="2" ALIGN="CENTER">
<BR><BR>
<TABLE BGCOLOR="FFFFFF" BORDER="0" COLS="1" WIDTH="50%" CELLSPACING="0"
CELLPADDING="2" ALIGN="CENTER">
@@
-71,6
+67,7
@@
CELLPADDING="2" ALIGN="CENTER">
</TR>
<TR BGCOLOR="<?php echo $color[4] ?>" WIDTH=100%>
<TD ALIGN="CENTER">
</TR>
<TR BGCOLOR="<?php echo $color[4] ?>" WIDTH=100%>
<TD ALIGN="CENTER">
+ <?php do_hook('logout_above_text'); ?>
<?php echo _("You have been successfully signed out.") ?><BR>
<A HREF="login.php" TARGET="_top">
<?php echo _("Click here to log back in.") ?>
<?php echo _("You have been successfully signed out.") ?><BR>
<A HREF="login.php" TARGET="_top">
<?php echo _("Click here to log back in.") ?>