From: x2003bruneau Date: Wed, 21 Nov 2007 23:26:21 +0000 (+0000) Subject: Hum, should avoid spool corruption when a message is canceled. X-Git-Tag: 1.8~4 X-Git-Url: http://git.polytechnique.org/?p=banana.git;a=commitdiff_plain;h=694a26ddbd8a37b658900291af371f5403d34009 Hum, should avoid spool corruption when a message is canceled. Signed-off-by: Florent Bruneau git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@307 9869982d-c50d-0410-be91-f2a2ec7c7c7b --- diff --git a/banana/spool.inc.php b/banana/spool.inc.php index efb2a04..86719f5 100644 --- a/banana/spool.inc.php +++ b/banana/spool.inc.php @@ -430,6 +430,7 @@ class BananaSpool // Remove from the message tree if (!is_null($parent)) { + $time = time(); foreach ($parent->children as $key=>&$child) { if ($child === $overview) { unset($parent->children[$key]); @@ -437,12 +438,12 @@ class BananaSpool } } if (sizeof($overview->children)) { - $parent->children = array_merge($parent->children, $overview->children); foreach ($overview->children as &$child) { + $parent->children[] =& $child; + $child->time = $time; $child->parent =& $parent; } } - $time = time(); while (!is_null($parent)) { $parent->desc--; $parent->time = $time;