summaryrefslogtreecommitdiffstats
path: root/db/foldermapper.php
diff options
context:
space:
mode:
authorBernhard Posselt <Raydiation@users.noreply.github.com>2015-03-30 19:40:07 +0200
committerBernhard Posselt <Raydiation@users.noreply.github.com>2015-03-30 19:40:07 +0200
commit05985bc2965f8a332e98121050ba1f07343bbc0f (patch)
tree96ca5d59b7ce3c9d3678dd95d8595145d1d5df08 /db/foldermapper.php
parenteb7fc97f33cadcf041a06915b8f1650a9b4f6bbb (diff)
parentee3d2332ec97487893ae5f1f46b599c550b25eb6 (diff)
Merge pull request #751 from owncloud/next
Changes for 8.1
Diffstat (limited to 'db/foldermapper.php')
-rw-r--r--db/foldermapper.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/db/foldermapper.php b/db/foldermapper.php
index bce599b45..867e05493 100644
--- a/db/foldermapper.php
+++ b/db/foldermapper.php
@@ -13,12 +13,12 @@
namespace OCA\News\Db;
-use \OCP\IDb;
-use \OCP\AppFramework\Db\Entity;
+use OCP\IDBConnection;
+use OCP\AppFramework\Db\Entity;
class FolderMapper extends NewsMapper {
- public function __construct(IDb $db) {
+ public function __construct(IDBConnection $db) {
parent::__construct($db, 'news_folders', '\OCA\News\Db\Folder');
}
@@ -58,12 +58,14 @@ class FolderMapper extends NewsMapper {
// we needz CASCADE + FKs please
$sql = 'DELETE FROM `*PREFIX*news_feeds` WHERE `folder_id` = ?';
$params = [$entity->getId()];
- $this->execute($sql, $params);
+ $stmt = $this->execute($sql, $params);
+ $stmt->closeCursor();
$sql = 'DELETE FROM `*PREFIX*news_items` WHERE `feed_id` NOT IN '.
'(SELECT `feeds`.`id` FROM `*PREFIX*news_feeds` `feeds`)';
- $this->execute($sql);
+ $stmt = $this->execute($sql);
+ $stmt->closeCursor();
}