projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move sqm_baseuri() to strings.php. A file for functions that manipulate strings...
[squirrelmail.git]
/
functions
/
tree.php
diff --git
a/functions/tree.php
b/functions/tree.php
index f8503b8110f5de6c9803e3a55e48c76361ea1b77..44a99e848329b3ad073f30c2ec2cc6fa136d804f 100644
(file)
--- a/
functions/tree.php
+++ b/
functions/tree.php
@@
-3,12
+3,11
@@
/**
* tree.php
*
/**
* tree.php
*
- * Copyright (c) 1999-2005 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
* This file provides functions to walk trees of folders, for
* instance to delete a whole tree.
*
* This file provides functions to walk trees of folders, for
* instance to delete a whole tree.
*
+ * @copyright © 1999-2005 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
*/
* @version $Id$
* @package squirrelmail
*/
@@
-103,7
+102,7
@@
function walkTreeInPreOrderEmptyFolder($index, $imap_stream, $tree, $mailbox) {
} else {
$mbx_response = sqimap_mailbox_select($imap_stream, $mailbox);
if ($mbx_response['EXISTS'] > 0) {
} else {
$mbx_response = sqimap_mailbox_select($imap_stream, $mailbox);
if ($mbx_response['EXISTS'] > 0) {
-
sqimap_messages_flag ($imap_stream, 1, '*', 'Deleted'
, true);
+
sqimap_toggle_flag($imap_stream, '1:*', '\\Deleted', true
, true);
// CLOSE === EXPUNGE and UNSELECT
sqimap_run_command($imap_stream,'CLOSE',false,$response,$message);
}
// CLOSE === EXPUNGE and UNSELECT
sqimap_run_command($imap_stream,'CLOSE',false,$response,$message);
}
@@
-114,7
+113,7
@@
function walkTreeInPreOrderEmptyFolder($index, $imap_stream, $tree, $mailbox) {
} else {
$mbx_response = sqimap_mailbox_select($imap_stream, $mailbox);
if ($mbx_response['EXISTS'] > 0) {
} else {
$mbx_response = sqimap_mailbox_select($imap_stream, $mailbox);
if ($mbx_response['EXISTS'] > 0) {
- sqimap_
messages_flag ($imap_stream, 1, '*', 'Deleted'
, true);
+ sqimap_
toggle_flag($imap_stream, '1:*', '\\Deleted', true
, true);
// CLOSE === EXPUNGE and UNSELECT
sqimap_run_command($imap_stream,'CLOSE',false,$response,$message);
}
// CLOSE === EXPUNGE and UNSELECT
sqimap_run_command($imap_stream,'CLOSE',false,$response,$message);
}
@@
-159,6
+158,7
@@
function walkTreeInPostOrderCreatingFoldersUnderTrash($index, $imap_stream, $tre
$mbx_response = sqimap_mailbox_select($imap_stream, $tree[$index]['value']);
$messageCount = $mbx_response['EXISTS'];
if ($messageCount > 0) {
$mbx_response = sqimap_mailbox_select($imap_stream, $tree[$index]['value']);
$messageCount = $mbx_response['EXISTS'];
if ($messageCount > 0) {
+ // FIXME: broken call
sqimap_messages_copy($imap_stream, 1, '*', $trash_folder . $delimiter . $subFolderName);
}
// after copy close the mailbox to get in unselected state
sqimap_messages_copy($imap_stream, 1, '*', $trash_folder . $delimiter . $subFolderName);
}
// after copy close the mailbox to get in unselected state
@@
-170,6
+170,7
@@
function walkTreeInPostOrderCreatingFoldersUnderTrash($index, $imap_stream, $tre
$mbx_response = sqimap_mailbox_select($imap_stream, $tree[$index]['value']);
$messageCount = $mbx_response['EXISTS'];
if ($messageCount > 0) {
$mbx_response = sqimap_mailbox_select($imap_stream, $tree[$index]['value']);
$messageCount = $mbx_response['EXISTS'];
if ($messageCount > 0) {
+ // FIXME: broken call
sqimap_messages_copy($imap_stream, 1, '*', $trash_folder . $delimiter . $subFolderName);
}
// after copy close the mailbox to get in unselected state
sqimap_messages_copy($imap_stream, 1, '*', $trash_folder . $delimiter . $subFolderName);
}
// after copy close the mailbox to get in unselected state
@@
-193,4
+194,5
@@
function simpleWalkTreePre($index, $tree) {
echo $tree[$index]['value'] . '<br />';
}
}
echo $tree[$index]['value'] . '<br />';
}
}
-?>
+
+?>
\ No newline at end of file