Performance fix: Do not ask for folder attributes if we know that folder do not exists

pull/89/head
Aleksander Machniak 12 years ago
parent d3d1e38d72
commit e89d8f1fec

@ -291,10 +291,12 @@ function rcube_subscription_form($attrib)
$classes[] = 'virtual';
}
if (!$protected) {
// Check \Noselect flag (of existing folder)
if (!$protected && in_array($folder['id'], $a_unsubscribed)) {
$attrs = $STORAGE->folder_attributes($folder['id']);
$noselect = in_array('\\Noselect', $attrs);
}
}
$disabled = (($protected && $subscribed) || $noselect);

Loading…
Cancel
Save