summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-09-17 16:06:17 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-09-17 16:06:17 (GMT)
commit9e49c5c83bca4a2b18a490c54b6568bbaa9a4e8d (patch)
treed8c8fd67c7ff64b7d2f485a2771e227c6432b775
parentd2e7c27bf4e44036def6592b772e220c13697606 (diff)
downloadroundcubemail-plugins-kolab-9e49c5c83bca4a2b18a490c54b6568bbaa9a4e8d.tar.gz
Quote also column aliases in sql tables, otherwise they will be returned uppercase in Oracle
-rw-r--r--plugins/libkolab/lib/kolab_storage_cache.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/libkolab/lib/kolab_storage_cache.php b/plugins/libkolab/lib/kolab_storage_cache.php
index c03554b..25b45ce 100644
--- a/plugins/libkolab/lib/kolab_storage_cache.php
+++ b/plugins/libkolab/lib/kolab_storage_cache.php
@@ -468,7 +468,7 @@ class kolab_storage_cache
// fetch full object data on one query if a small result set is expected
$fetchall = !$uids && ($this->limit ? $this->limit[0] : $this->count($query)) < 500;
- $sql_query = "SELECT " . ($fetchall ? '*' : '`msguid` AS _msguid, `uid`') . " FROM `{$this->cache_table}` ".
+ $sql_query = "SELECT " . ($fetchall ? '*' : '`msguid` AS `_msguid`, `uid`') . " FROM `{$this->cache_table}` ".
"WHERE `folder_id` = ? " . $this->_sql_where($query);
if (!empty($this->order_by)) {
$sql_query .= ' ORDER BY ' . $this->order_by;
@@ -551,7 +551,7 @@ class kolab_storage_cache
$this->_read_folder_data();
$sql_result = $this->db->query(
- "SELECT COUNT(*) AS numrows FROM `{$this->cache_table}` ".
+ "SELECT COUNT(*) AS `numrows` FROM `{$this->cache_table}` ".
"WHERE `folder_id` = ?" . $this->_sql_where($query),
$this->folder_id
);