Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/passman.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarcos Zuriaga <wolfi@wolfi.es>2016-10-15 00:37:16 +0300
committerMarcos Zuriaga <wolfi@wolfi.es>2016-10-15 00:37:16 +0300
commit0779d79ccab9949e35920937023d283bd9c16849 (patch)
tree9cc6a7f2f6ce4823c39c6b62a09989f17ffde663 /lib
parentc91c9cb6d86d28a21d71a2ef5b271e4e24ce89d5 (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.php4
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]);
}