summaryrefslogtreecommitdiffstats
path: root/lib/public/appframework
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2015-03-18 22:20:23 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2015-03-18 22:20:23 +0100
commitf77ae37f23b16996ae6b33c5d6b9188e33435b55 (patch)
tree3d38bc93dcc278b13be3a14133d7ed8e54f70700 /lib/public/appframework
parentc52bd10361be8ac834359022330b86a80d4f16ba (diff)
downloadnextcloud-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.php7
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) {