diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-03-18 22:20:23 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-03-18 22:20:23 +0100 |
commit | f77ae37f23b16996ae6b33c5d6b9188e33435b55 (patch) | |
tree | 3d38bc93dcc278b13be3a14133d7ed8e54f70700 /lib/public/appframework | |
parent | c52bd10361be8ac834359022330b86a80d4f16ba (diff) | |
download | nextcloud-server-f77ae37f23b16996ae6b33c5d6b9188e33435b55.tar.gz nextcloud-server-f77ae37f23b16996ae6b33c5d6b9188e33435b55.zip |
also use backwards compatible method for mapper
Diffstat (limited to 'lib/public/appframework')
-rw-r--r-- | lib/public/appframework/db/mapper.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/public/appframework/db/mapper.php b/lib/public/appframework/db/mapper.php index 266b7e6f2b2..aaef0f79d27 100644 --- a/lib/public/appframework/db/mapper.php +++ b/lib/public/appframework/db/mapper.php @@ -27,6 +27,7 @@ namespace OCP\AppFramework\Db; use OCP\IDBConnection; +use OCP\IDb; /** @@ -193,7 +194,11 @@ abstract class Mapper { * @return \PDOStatement the database query result */ protected function execute($sql, array $params=[], $limit=null, $offset=null){ - $query = $this->db->prepare($sql, $limit, $offset); + if ($this->db instanceof IDb) { + $query = $this->db->prepareQuery($sql, $limit, $offset); + } else { + $query = $this->db->prepare($sql, $limit, $offset); + } $index = 1; // bindParam is 1 indexed foreach($params as $param) { |