From 15cf4fa9251f01313b5eb5cf1a91ec10643d42cb Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 21 Nov 2012 13:55:34 -0500
Subject: [PATCH] Rename rcube_bc.inc to bc.php for consistency

---
 program/steps/settings/edit_folder.inc |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/program/steps/settings/edit_folder.inc b/program/steps/settings/edit_folder.inc
index b99764c..cd23727 100644
--- a/program/steps/settings/edit_folder.inc
+++ b/program/steps/settings/edit_folder.inc
@@ -6,7 +6,10 @@
  |                                                                       |
  | This file is part of the Roundcube Webmail client                     |
  | Copyright (C) 2005-2009, The Roundcube Dev Team                       |
- | Licensed under the GNU GPL                                            |
+ |                                                                       |
+ | Licensed under the GNU General Public License version 3 or            |
+ | any later version with exceptions for skins & plugins.                |
+ | See the README file for a full license statement.                     |
  |                                                                       |
  | PURPOSE:                                                              |
  |   Provide functionality to create/edit a folder                       |
@@ -14,9 +17,6 @@
  +-----------------------------------------------------------------------+
  | Author: Aleksander Machniak <alec@alec.pl>                            |
  +-----------------------------------------------------------------------+
-
- $Id$
-
 */
 
 // WARNING: folder names in UI are encoded with RCMAIL_CHARSET
@@ -112,6 +112,15 @@
     }
     else {
         $selected = isset($_POST['_parent']) ? $_POST['_parent'] : $path_id;
+        $exceptions = array($mbox_imap);
+
+        // Exclude 'prefix' namespace from parent folders list (#1488349)
+        // If INBOX. namespace exists, folders created as INBOX subfolders
+        // will be listed at the same level - selecting INBOX as a parent does nothing
+        if ($prefix = $storage->get_namespace('prefix')) {
+            $exceptions[] = substr($prefix, 0, -1);
+        }
+
         $select = rcmail_mailbox_select(array(
             'name'        => '_parent',
             'noselection' => '---',
@@ -119,7 +128,7 @@
             'maxlength'   => 150,
             'unsubscribed' => true,
             'skip_noinferiors' => true,
-            'exceptions'  => array($mbox_imap),
+            'exceptions'  => $exceptions,
         ));
 
         $form['props']['fieldsets']['location']['content']['path'] = array(

--
Gitblit v1.9.1