Add ability to filter on the Message body, or if text appears any where in the messag...
[squirrelmail.git] / src / delete_message.php
index 1304aca9ed2608e07a643ff56d6698cb6165f712..fcde0e72c24f39192778d9a159756242409e6f9f 100644 (file)
@@ -3,16 +3,19 @@
 /**
  * delete_message.php
  *
- * Copyright (c) 1999-2004 The SquirrelMail Project Team
+ * Copyright (c) 1999-2005 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * Deletes a meesage from the IMAP server
  *
- * $Id$
+ * @version $Id$
  * @package squirrelmail
  */
 
-/** Path for SquirrelMail required files. */
+/**
+ * Path for SquirrelMail required files.
+ * @ignore
+ */
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
@@ -45,10 +48,10 @@ if (sqGetGlobalVar('what', $tmp, SQ_FORM)) {
     $what = urlencode($tmp);
 }
 if (sqGetGlobalVar('sort', $tmp, SQ_FORM)) {
-       $sort = (int) $tmp;
+    $sort = (int) $tmp;
 }
 if (sqGetGlobalVar('startMessage', $tmp, SQ_FORM)) {
-       $startMessage = (int) $tmp;
+    $startMessage = (int) $tmp;
 }
 
 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
@@ -72,16 +75,11 @@ $location = get_location();
 if (isset($where) && isset($what)) {
     header("Location: $location/search.php?where=" . $where .
            '&what=' . $what . '&mailbox=' . urlencode($mailbox));
-} else {
-    if (!empty($saved_draft) || !empty($mail_sent)) {
-          header("Location: $location/compose.php?mail_sent=$mail_sent&saved_draft=$saved_draft");
-    }
-    else {
-        header("Location: $location/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=" .
-               urlencode($mailbox));
-    }
 }
 
+header("Location: $location/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=" .
+    urlencode($mailbox));
+
 sqimap_logout($imapConnection);
 
 ?>