projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed some bugs in the sqimap_mailbox_close() function
[squirrelmail.git]
/
src
/
move_messages.php
diff --git
a/src/move_messages.php
b/src/move_messages.php
index 56e96e7404a558be3022fa6a08a21b99f843c337..8b6a5f543e6d829e4dc15b24480ae77f7754c8f6 100644
(file)
--- a/
src/move_messages.php
+++ b/
src/move_messages.php
@@
-1,4
+1,15
@@
-<?
+<?php
+ /**
+ ** move_messages.php
+ **
+ ** Copyright (c) 1999-2000 The SquirrelMail development team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** Enables message moving between folders on the IMAP server.
+ **/
+
+ session_start();
+
if (!isset($config_php))
include("../config/config.php");
if (!isset($strings_php))
if (!isset($config_php))
include("../config/config.php");
if (!isset($strings_php))
@@
-12,8
+23,6
@@
include("../src/load_prefs.php");
include("../src/load_prefs.php");
- echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
-
function putSelectedMessagesIntoString($msg) {
$j = 0;
$i = 0;
function putSelectedMessagesIntoString($msg) {
$j = 0;
$i = 0;
@@
-42,7
+51,6
@@
// If the delete button was pressed, the moveButton variable will not be set.
if (!$moveButton) {
// If the delete button was pressed, the moveButton variable will not be set.
if (!$moveButton) {
- displayPageHeader($color, $mailbox);
if (is_array($msg) == 1) {
// Marks the selected messages ad 'Deleted'
$j = 0;
if (is_array($msg) == 1) {
// Marks the selected messages ad 'Deleted'
$j = 0;
@@
-57,14
+65,19
@@
}
$i++;
}
}
$i++;
}
- if ($auto_expunge)
+ if ($auto_expunge)
{
sqimap_mailbox_expunge($imapConnection, $mailbox);
sqimap_mailbox_expunge($imapConnection, $mailbox);
- messages_deleted_message($mailbox, $sort, $startMessage, $color);
+ }
+ $location = get_location();
+ if ($where && $what)
+ header ("Location: $location/search.php?mailbox=".urlencode($mailbox)."&what=".urlencode($what)."&where=".urlencode($where));
+ else
+ header ("Location: $location/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=". urlencode($mailbox));
} else {
} else {
+ displayPageHeader($color, $mailbox);
error_message(_("No messages were selected."), $mailbox, $sort, $startMessage, $color);
}
} else { // Move messages
error_message(_("No messages were selected."), $mailbox, $sort, $startMessage, $color);
}
} else { // Move messages
- displayPageHeader($color, $mailbox);
// lets check to see if they selected any messages
if (is_array($msg) == 1) {
$j = 0;
// lets check to see if they selected any messages
if (is_array($msg) == 1) {
$j = 0;
@@
-84,13
+97,19
@@
if ($auto_expunge == true)
sqimap_mailbox_expunge($imapConnection, $mailbox);
if ($auto_expunge == true)
sqimap_mailbox_expunge($imapConnection, $mailbox);
- messages_moved_message($mailbox, $sort, $startMessage, $color);
+ $location = get_location();
+ if ($where && $what)
+ header ("Location: $location/search.php?mailbox=".urlencode($mailbox)."&what=".urlencode($what)."&where=".urlencode($where));
+ else
+ header ("Location: $location/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=". urlencode($mailbox));
} else {
} else {
+ displayPageHeader($color, $mailbox);
error_message(_("No messages were selected."), $mailbox, $sort, $startMessage, $color);
}
}
// Log out this session
error_message(_("No messages were selected."), $mailbox, $sort, $startMessage, $color);
}
}
// Log out this session
+ sqimap_mailbox_close($imapConnection);
sqimap_logout($imapConnection);
?>
sqimap_logout($imapConnection);
?>