Fix SQL syntax error on MariaDB 10.2 (#5774)

release-1.2
Aleksander Machniak 7 years ago
parent 793bf96747
commit 913ffcfbbe

@ -5,6 +5,7 @@ CHANGELOG Roundcube Webmail
- Fix bug where comment notation within style tag would cause the whole style to be ignored (#5747)
- Fix bug where it wasn't possible to scroll folders list in Edge (#5750)
- Fix addressbook searching by gender (#5757)
- Fix SQL syntax error on MariaDB 10.2 (#5774)
RELEASE 1.2.5
-------------

@ -502,7 +502,7 @@ class rcube_contacts extends rcube_addressbook
// count contacts for this user
$sql_result = $this->db->query(
"SELECT COUNT(c.`contact_id`) AS rows".
"SELECT COUNT(c.`contact_id`) AS cnt".
" FROM " . $this->db->table_name($this->db_name, true) . " AS c".
$join.
" WHERE c.`del` <> 1".
@ -515,7 +515,7 @@ class rcube_contacts extends rcube_addressbook
$sql_arr = $this->db->fetch_assoc($sql_result);
$this->cache['count'] = (int) $sql_arr['rows'];
$this->cache['count'] = (int) $sql_arr['cnt'];
return $this->cache['count'];
}

Loading…
Cancel
Save