From: alex-brainstorm Date: Fri, 26 Mar 2004 12:02:30 +0000 (+0000) Subject: When copying a folder to trash before deletion, check that the top folder name really... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4bce71a5de179d5ef15d1965b96d3969aa362e43;p=squirrelmail.git When copying a folder to trash before deletion, check that the top folder name really contains the delimiter. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6903 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/tree.php b/functions/tree.php index 2ae801f3..0b3274fd 100644 --- a/functions/tree.php +++ b/functions/tree.php @@ -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']) {