From: Michael M Slusarz Date: Wed, 10 Dec 2008 01:25:45 +0000 (-0700) Subject: Fix creating a mailbox. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=75871e0ac3d45aa33a94d096a1c50a0f6f046e7b;p=horde.git Fix creating a mailbox. CreateSubfolder does not exist as an action so remove it. --- diff --git a/imp/imp-dimp.php b/imp/imp-dimp.php index fe2afbfce..6a0ae5713 100644 --- a/imp/imp-dimp.php +++ b/imp/imp-dimp.php @@ -174,29 +174,25 @@ $result = false; /* We know we are going to be exclusively dealing with this mailbox, so * select it on the IMAP server (saves some STATUS calls). */ -if ($folder && !$imp_search->isSearchMbox($folder)) { +if ($folder && + ($action != 'CreateFolder') && + !$imp_search->isSearchMbox($folder)) { $imp_imap->ob->openMailbox($folder); } switch ($action) { case 'CreateFolder': -case 'CreateSubfolder': if (empty($folder)) { break; } - $parent = Util::getPost('parent'); - if (($action == 'CreateSubfolder') && !$parent) { - break; - } - $imptree = &IMP_IMAP_Tree::singleton(); $imptree->eltDiffStart(); $imp_folder = &IMP_Folder::singleton(); $new = String::convertCharset($folder, NLS::getCharset(), 'UTF7-IMAP'); - $new = $imptree->createMailboxName($parent, $new); + $new = $imptree->createMailboxName(Util::getPost('parent'), $new); if (is_a($new, 'PEAR_Error')) { $notification->push($new, 'horde.error'); $result = false;