Skip to content

Commit

Permalink
Fix SQL syntax error on MariaDB 10.2 (#5774)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed May 28, 2017
1 parent bb67757 commit 6ad4ebe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ CHANGELOG Roundcube Webmail
- Fix POST parameter reflection in default_charset selector (#5768)
- Enigma: Fix compatibility with assets_dir
- Managesieve: Skip redundant LISTSCRIPTS command
- Fix SQL syntax error on MariaDB 10.2 (#5774)

RELEASE 1.3-rc
--------------
Expand Down
4 changes: 2 additions & 2 deletions program/lib/Roundcube/rcube_contacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ private function _count()

// 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".
Expand All @@ -500,7 +500,7 @@ private function _count()

$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'];
}
Expand Down

0 comments on commit 6ad4ebe

Please sign in to comment.