When copying a folder to trash before deletion, check that the top folder name really...
authoralex-brainstorm <alex-brainstorm@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 26 Mar 2004 12:02:30 +0000 (12:02 +0000)
committeralex-brainstorm <alex-brainstorm@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 26 Mar 2004 12:02:30 +0000 (12:02 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6903 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/tree.php

index 2ae801f32ee97b67c7232e82919f618ce5bf7c2f..0b3274fd8123a2a0f15c288528eac7580745ee3a 100644 (file)
@@ -135,7 +135,9 @@ function walkTreeInPreOrderDeleteFolders($index, $imap_stream, $tree) {
 function walkTreeInPostOrderCreatingFoldersUnderTrash($index, $imap_stream, $tree, $topFolderName) {
     global $trash_folder, $delimiter;
 
-    $position = strrpos($topFolderName, $delimiter) + 1;
+    $position = strrpos($topFolderName, $delimiter);
+    if ($position !== FALSE)
+        $position++;
     $subFolderName = substr($tree[$index]['value'], $position);
 
     if ($tree[$index]['doIHaveChildren']) {