Aleksander Machniak
2014-04-28 54185837c83bf93ff2d971b986ac13530c1e840b
Make identity name field optional (#1489510)
Get rid of unhelpful error message.
5 files modified
18 ■■■■■ changed files
CHANGELOG 3 ●●●● patch | view | raw | blame | history
program/js/app.js 4 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_user.php 5 ●●●● patch | view | raw | blame | history
program/steps/settings/edit_identity.inc 2 ●●● patch | view | raw | blame | history
program/steps/settings/save_identity.inc 4 ●●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Make identity name field optional (#1489510)
- Utility script to remove user records from the local database
- Plugin API: Added message_saved hook (#1489752)
- Support messages import from zip archives
@@ -10,10 +11,10 @@
- Search across multiple folders (#1485234)
- Improve UI integration of ACL settings
- Drop support for PHP < 5.3.7
- Apply user-specific replacements to group's base_dn property (#1489779)
- Set In-Reply-To and References for forwarded messages (#1489593)
- Removed redundant default_folders config option (#1489737)
- Implemented IMAP SPECIAL-USE extension support [RFC6154] (#1487830)
- Apply user-specific replacements to group's base_dn property (#1489779)
- Fix mbox files import
- Fix bug where "With attachment" option in search filter wasn't selected after return from mail view (#1489774)
- Fix "washing" of unicoded style attributes (#1489777)
program/js/app.js
@@ -857,9 +857,9 @@
            else if (this.task == 'settings' && (this.env.identities_level % 2) == 0  &&
              (input = $("input[name='_email']", form)) && input.length && !rcube_check_email(input.val())
            ) {
              alert(this.get_label('noemailwarning'));
//              alert(this.get_label('noemailwarning'));
              input.focus();
              break;
//              break;
            }
            // clear empty input fields
program/lib/Roundcube/rcube_user.php
@@ -267,7 +267,10 @@
            "SELECT * FROM ".$this->db->table_name('identities').
            " WHERE del <> 1 AND user_id = ?".
            ($sql_add ? " ".$sql_add : "").
            " ORDER BY ".$this->db->quote_identifier('standard')." DESC, name ASC, identity_id ASC",
            " ORDER BY ". $this->db->quote_identifier('standard') . " DESC, "
                . $this->db->quote_identifier('name') . " ASC, "
                . $this->db->quote_identifier('email') . " ASC, "
                . $this->db->quote_identifier('identity_id') . " ASC",
            $this->ID);
        while ($sql_arr = $this->db->fetch_assoc($sql_result)) {
program/steps/settings/edit_identity.inc
@@ -71,7 +71,7 @@
    $RCMAIL->html_editor('identity');
    // add some labels to client
    $OUTPUT->add_label('noemailwarning', 'nonamewarning', 'converting', 'editorwarning');
    $OUTPUT->add_label('noemailwarning', 'converting', 'editorwarning');
    $i_size = !empty($attrib['size']) ? $attrib['size'] : 40;
    $t_rows = !empty($attrib['textarearows']) ? $attrib['textarearows'] : 6;
program/steps/settings/save_identity.inc
@@ -26,8 +26,8 @@
$updated = $default_id = false;
// check input
if (IDENTITIES_LEVEL != 4 && (empty($_POST['_name']) || (empty($_POST['_email']) && IDENTITIES_LEVEL != 1 && IDENTITIES_LEVEL != 3))) {
    $OUTPUT->show_message('formincomplete', 'warning');
if (empty($_POST['_email']) && (IDENTITIES_LEVEL == 0 || IDENTITIES_LEVEL == 2)) {
    $OUTPUT->show_message('noemailwarning', 'warning');
    $RCMAIL->overwrite_action('edit-identity');
    return;
}