thomascube
2011-09-28 63d6e6dfc35e6d82c4a64f37c408794c163becd4
program/steps/settings/save_folder.inc
@@ -66,12 +66,25 @@
        $name_imap = $path . $delimiter . $name_imap;
    }
    else {
        $name_imap = $RCMAIL->imap->mod_mailbox($name, 'in');
        $name_imap = $RCMAIL->imap->mod_mailbox($name_imap, 'in');
    }
}
// Check access rights to the parent folder
if (!$error && strlen($path) && (!strlen($old_imap) || $old_imap != $name_imap)) {
    $parent_opts = $RCMAIL->imap->mailbox_info($path);
    if ($parent_opts['namespace'] != 'personal'
        && (empty($parent_opts['rights']) || !preg_match('/[ck]/', implode($parent_opts)))
    ) {
        $error = rcube_label('parentnotwritable');
    }
}
if (!$error) {
    $folder['name']     = $name_imap;
    $folder['oldname']  = $old_imap;
    $folder['class']    = '';
    $folder['options']  = $options;
    $folder['settings'] = array(
        // List view mode: 0-list, 1-threads
        'view_mode'   => (int) get_input_value('_viewmode', RCUBE_INPUT_POST),