diff options
author | Marcos Zuriaga <wolfi@wolfi.es> | 2016-10-15 00:37:16 +0300 |
---|---|---|
committer | Marcos Zuriaga <wolfi@wolfi.es> | 2016-10-15 00:37:16 +0300 |
commit | 0779d79ccab9949e35920937023d283bd9c16849 (patch) | |
tree | 9cc6a7f2f6ce4823c39c6b62a09989f17ffde663 /lib | |
parent | c91c9cb6d86d28a21d71a2ef5b271e4e24ce89d5 (diff) |
Fix sqlite bug, hope the mysql problem is not happening on other systems and the sql statement works on all the other systems
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Db/ShareRequestMapper.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Db/ShareRequestMapper.php b/lib/Db/ShareRequestMapper.php index 22a69b63..aa27b090 100644 --- a/lib/Db/ShareRequestMapper.php +++ b/lib/Db/ShareRequestMapper.php @@ -43,7 +43,9 @@ class ShareRequestMapper extends Mapper { * @return ShareRequest[] */ public function getRequestsByItemGuidGroupedByUser($item_guid){ - $this->db->executeQuery("SET sql_mode = '';"); + if (strtolower($this->db->getDatabasePlatform()->getName()) === 'mysql'){ + $this->db->executeQuery("SET sql_mode = '';"); + } $q = "SELECT *, target_user_id FROM *PREFIX*" . self::TABLE_NAME . " WHERE item_guid = ? GROUP BY target_user_id;"; return $this->findEntities($q, [$item_guid]); } |