Fix so "set as default" option is hidden if identities_level > 1 (#1490226)

release-1.0
Aleksander Machniak 10 years ago
parent db780e10e4
commit 56caf85079

@ -7,6 +7,7 @@ CHANGELOG Roundcube Webmail
- Fix checks based on window.ActiveXObject in IE > 10 - Fix checks based on window.ActiveXObject in IE > 10
- Fix XSS issue in style attribute handling (#1490227) - Fix XSS issue in style attribute handling (#1490227)
- Fix bug where Drafts list wasn't updated on draft-save action in new window (#1490225) - Fix bug where Drafts list wasn't updated on draft-save action in new window (#1490225)
- Fix so "set as default" option is hidden if identities_level > 1 (#1490226)
RELEASE 1.0.4 RELEASE 1.0.4
------------- -------------

@ -109,6 +109,11 @@ function rcube_identity_form($attrib)
$IDENTITY_RECORD['signature'] = htmlspecialchars($IDENTITY_RECORD['signature'], ENT_NOQUOTES, RCUBE_CHARSET); $IDENTITY_RECORD['signature'] = htmlspecialchars($IDENTITY_RECORD['signature'], ENT_NOQUOTES, RCUBE_CHARSET);
} }
// hide "default" checkbox if only one identity is allowed
if (IDENTITIES_LEVEL > 1) {
unset($form['addressing']['content']['standard']);
}
// disable some field according to access level // disable some field according to access level
if (IDENTITIES_LEVEL == 1 || IDENTITIES_LEVEL == 3) { if (IDENTITIES_LEVEL == 1 || IDENTITIES_LEVEL == 3) {
$form['addressing']['content']['email']['disabled'] = true; $form['addressing']['content']['email']['disabled'] = true;

@ -49,6 +49,11 @@ foreach ($a_boolean_cols as $col) {
} }
} }
// make the identity a "default" if only one identity is allowed
if (IDENTITIES_LEVEL > 1) {
$save_data['standard'] = 1;
}
// unset email address if user has no rights to change it // unset email address if user has no rights to change it
if (IDENTITIES_LEVEL == 1 || IDENTITIES_LEVEL == 3) { if (IDENTITIES_LEVEL == 1 || IDENTITIES_LEVEL == 3) {
unset($save_data['email']); unset($save_data['email']);

Loading…
Cancel
Save