alecpl
2011-12-01 14b342b03aaedadb67244149e7dea3210c6ac0ed
program/steps/settings/edit_folder.inc
@@ -119,7 +119,8 @@
            'realnames'   => false,
            'maxlength'   => 150,
            'unsubscribed' => true,
            'exceptions' => array($mbox_imap),
            'skip_noinferiors' => true,
            'exceptions'  => array($mbox_imap),
        ));
        $form['props']['fieldsets']['location']['content']['path'] = array(
@@ -134,7 +135,7 @@
    );
    // Settings: threading
    if ($threading_supported && !$options['noselect'] && !$options['is_root']) {
    if ($threading_supported && ($mbox_imap == 'INBOX' || (!$options['noselect'] && !$options['is_root']))) {
        $select = new html_select(array('name' => '_viewmode', 'id' => '_listmode'));
        $select->add(rcube_label('list'), 0);
        $select->add(rcube_label('threads'), 1);
@@ -191,7 +192,7 @@
            'content' => array()
        );
        if (!$options['noselect'] && !$options['is_root']) {
        if ((!$options['noselect'] && !$options['is_root']) || $mbox_imap == 'INBOX') {
            $msgcount = $RCMAIL->imap->messagecount($mbox_imap, 'ALL', true, false);
            // Size
@@ -255,7 +256,7 @@
            $content = rcmail_get_form_part($tab);
        }
        if ($content) {
        if ($content) {
            $out .= html::tag('fieldset', null, html::tag('legend', null, Q($tab['name'])) . $content) ."\n";
        }
    }
@@ -287,30 +288,6 @@
    }
    return $content;
}
function rcmail_localize_folderpath($path)
{
    global $RCMAIL;
    $protect_folders = $RCMAIL->config->get('protect_default_folders');
    $default_folders = (array) $RCMAIL->config->get('default_imap_folders');
    $delimiter       = $RCMAIL->imap->get_hierarchy_delimiter();
    $path            = explode($delimiter, $path);
    $result          = array();
    foreach ($path as $idx => $dir) {
        $directory = implode($delimiter, array_slice($path, 0, $idx+1));
        if ($protect_folders && in_array($directory, $default_folders)) {
            unset($result);
            $result[] = rcmail_localize_foldername($directory);
        }
        else {
            $result[] = rcube_charset_convert($dir, 'UTF7-IMAP');
        }
    }
    return implode($delimiter, $result);
}