projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- added more hooks
[squirrelmail.git]
/
src
/
move_messages.php
diff --git
a/src/move_messages.php
b/src/move_messages.php
index fb973b347afb8d8a229d1c1555d830591ee76067..8b7b7cf802770ac1c1c61041ed2fdf131a90f3ac 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;
@@
-37,12
+46,11
@@
}
}
}
}
- $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0);
+ $imapConnection = sqimap_login($username, $key, $imapServerAddress,
$imapPort,
0);
sqimap_mailbox_select($imapConnection, $mailbox);
// If the delete button was pressed, the moveButton variable will not be set.
if (!$moveButton) {
sqimap_mailbox_select($imapConnection, $mailbox);
// 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,8
+97,13
@@
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);
}
}
error_message(_("No messages were selected."), $mailbox, $sort, $startMessage, $color);
}
}