|
|
@ -55,16 +55,6 @@ else {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Check access rights to the parent folder
|
|
|
|
|
|
|
|
if (!$error && strlen($path)) {
|
|
|
|
|
|
|
|
$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) {
|
|
|
|
if ($error) {
|
|
|
|
$OUTPUT->command('display_message', $error, 'error');
|
|
|
|
$OUTPUT->command('display_message', $error, 'error');
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -78,7 +68,19 @@ else {
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
$name_imap = $RCMAIL->imap->mod_mailbox($name_imap, '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['name'] = $name_imap;
|
|
|
|
$folder['oldname'] = $old_imap;
|
|
|
|
$folder['oldname'] = $old_imap;
|
|
|
|
$folder['class'] = '';
|
|
|
|
$folder['class'] = '';
|
|
|
|