alecpl
2011-07-29 f9e2858ae11e93b90e5adbaaa308891e05a65111
program/steps/settings/edit_folder.inc
@@ -79,7 +79,7 @@
    // Location (name)
    if ($options['protected']) {
        $foldername = Q(rcmail_localize_foldername($mbox_imap));
        $foldername = Q(str_replace($delimiter, ' » ', rcmail_localize_folderpath($mbox_imap)));
    }
    else if ($options['norename']) {
        $foldername = Q($folder);
@@ -106,25 +106,26 @@
        ),
    );
    if (strlen($path)) {
    if (strlen($path) || !strlen($mbox)) {
        if (!empty($options) && ($options['norename'] || $options['namespace'] != 'personal')) {
            // prevent user from moving folder
            $hidden_path = new html_hiddenfield(array('name' => '_parent', 'value' => $path));
            $form['props']['fieldsets']['location']['content']['name']['value'] .= $hidden_path->show();
        }
        else {
            $radio1 = new html_radiobutton(array('name' => '_parent', 'value' => ''));
            $radio2 = new html_radiobutton(array('name' => '_parent', 'value' => $path_id));
            $selected  = isset($_POST['_parent']) ? $_POST['_parent'] : $path_id;
            $html_path = str_replace($delimiter, ' » ', rcmail_localize_folderpath($path));
            $folderpath = $radio1->show($selected) . Q(rcube_label('none')) . ' '
                .$radio2->show($selected) . Q($html_path);
            $selected = isset($_POST['_parent']) ? $_POST['_parent'] : $path_id;
            $select = rcmail_mailbox_select(array(
                'name'        => '_parent',
                'noselection' => '---',
                'realnames'   => false,
                'maxlength'   => 150,
                'unsubscribed' => true,
                'exceptions' => array($mbox_imap),
            ));
            $form['props']['fieldsets']['location']['content']['path'] = array(
                'label' => rcube_label('parentfolder'),
                'value' => $folderpath,
                'value' => $select->show($selected),
            );
        }
    }
@@ -135,7 +136,7 @@
    );
    // Settings: threading
    if ($threading_supported && !$options['noselect']) {
    if ($threading_supported && !$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);
@@ -192,7 +193,7 @@
            'content' => array()
        );
        if (!$options['noselect']) {
        if (!$options['noselect'] && !$options['is_root']) {
            $msgcount = $RCMAIL->imap->messagecount($mbox_imap, 'ALL', true, false);
            // Size