|
@@ -21,7 +21,6 @@ function sqimap_messages_copy ($imap_stream, $start, $end, $mailbox) {
|
|
|
function sqimap_msgs_list_copy ($imap_stream, $id, $mailbox) {
|
|
|
global $uid_support;
|
|
|
$msgs_id = sqimap_message_list_squisher($id);
|
|
|
- echo $msgs_id;
|
|
|
$read = sqimap_run_command ($imap_stream, "COPY $msgs_id \"$mailbox\"", true, $response, $message, $uid_support);
|
|
|
$read = sqimap_run_command ($imap_stream, "STORE $msgs_id +FLAGS (\\Deleted)", true, $response, $message, $uid_support);
|
|
|
}
|
|
@@ -380,10 +379,6 @@ function get_thread_sort ($imap_stream) {
|
|
|
if (isset($thread_list)) {
|
|
|
$thread_temp = preg_split("//", $thread_list, -1, PREG_SPLIT_NO_EMPTY);
|
|
|
}
|
|
|
- $t = new thread();
|
|
|
- $t->parseThread($thread_list);
|
|
|
- print_r($t);
|
|
|
- echo $thread_list;
|
|
|
$char_count = count($thread_temp);
|
|
|
$counter = 0;
|
|
|
$thread_new = array();
|
|
@@ -421,53 +416,6 @@ function get_thread_sort ($imap_stream) {
|
|
|
return $thread_list;
|
|
|
}
|
|
|
|
|
|
-class thread {
|
|
|
- var $thread_cnt=0,
|
|
|
- $id='',
|
|
|
- $childs = array();
|
|
|
-
|
|
|
- function addChild($id) {
|
|
|
- $this->childs[] = new thread();
|
|
|
- }
|
|
|
-
|
|
|
- function parseThread($thread_list, $i=0, $thread_cnt=0) {
|
|
|
- $par = false;
|
|
|
- $thread_id = '';
|
|
|
- for ($cnt = strlen($thread_list);$i<$cnt;++$i) {
|
|
|
- $char = $thread_list{$i};
|
|
|
- switch ($char) {
|
|
|
- case '(':
|
|
|
- $par = new thread();
|
|
|
- ++$thread_cnt;
|
|
|
- $thread_id = '';
|
|
|
- break;
|
|
|
- case ' ':
|
|
|
- $par->id = $thread_id;
|
|
|
- ++$thread_cnt;
|
|
|
- $res_a = $this->parseThread($thread,$i, $thread_cnt);
|
|
|
- $par->childs[] = $res_a[0];
|
|
|
- $i = $res_a[1];
|
|
|
- $thread_id = '';
|
|
|
- break;
|
|
|
- case ')':
|
|
|
- if ($thread_id) {
|
|
|
- $par->id = $thread_id;
|
|
|
- $thread_id='';
|
|
|
- }
|
|
|
- $par->thread_cnt=$thread_cnt;
|
|
|
- if (count($this->childs)) {
|
|
|
- return array($par, $i);
|
|
|
- } else {
|
|
|
- $this->childs[] = $par;
|
|
|
- }
|
|
|
- default:
|
|
|
- $thread_id .= $char;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- print_r($this);
|
|
|
- }
|
|
|
-}
|
|
|
|
|
|
function elapsedTime($start) {
|
|
|
$stop = gettimeofday();
|