fixed 'list all' in addressbook #506624, thanks to Kurt Yoder
[squirrelmail.git] / src / signout.php
index ed82aeb2e5223fa8bce9e941919d3d3b06befcab..9a37ca208aaa324d45d0b709abe096731bfa6fae 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * signout.php -- cleans up session and logs the user out
  *
- * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Copyright (c) 1999-2002 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  *  Cleans up after the user. Resets cookies and terminates session.
 require_once('../src/validate.php');
 require_once('../functions/prefs.php');
 require_once('../functions/plugin.php');
+require_once('../functions/strings.php');
 
    // Erase any lingering attachments
    if (! isset($attachments)) {
        $attachments = array();
    }
+   $hashed_attachment_dir = getHashedDir($username, $attachment_dir);
    foreach ($attachments as $info) {
-       if (file_exists($attachment_dir . $info['localfilename'])) {
-           unlink($attachment_dir . $info['localfilename']);
+       $attached_file = "$hashed_attachment_dir/$info[localfilename]";
+       if (file_exists($attached_file)) {
+           unlink($attached_file);
        }
    }
 
@@ -74,14 +77,14 @@ require_once('../functions/plugin.php');
 LINK="<?php echo $color[7] ?>" VLINK="<?php echo $color[7] ?>"
 ALINK="<?php echo $color[7] ?>">
 <BR><BR>
-<TABLE BGCOLOR="FFFFFF" BORDER="0" COLS="1" WIDTH="50%" CELLSPACING="0" 
+<TABLE BGCOLOR="<?php echo $color[4]; ?>" BORDER="0" COLS="1" WIDTH="50%" CELLSPACING="0" 
 CELLPADDING="2" ALIGN="CENTER">
-  <TR BGCOLOR="<?php echo $color[0] ?>" WIDTH=100%>
+  <TR BGCOLOR="<?php echo $color[0] ?>" WIDTH="100%">
     <TD ALIGN="CENTER">
       <B><?php echo _("Sign Out") ?></B>
     </TD>
   </TR>
-  <TR BGCOLOR="<?php echo $color[4] ?>" WIDTH=100%>
+  <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>
@@ -90,7 +93,7 @@ CELLPADDING="2" ALIGN="CENTER">
       </A><BR><BR>
     </TD>
   </TR>
-  <TR BGCOLOR="<?php echo $color[0] ?>" WIDTH=100%>
+  <TR BGCOLOR="<?php echo $color[0] ?>" WIDTH="100%">
     <TD ALIGN="CENTER">
       <BR>
     </TD>