summaryrefslogtreecommitdiffstats
path: root/db/postgres/itemmapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'db/postgres/itemmapper.php')
-rw-r--r--db/postgres/itemmapper.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/db/postgres/itemmapper.php b/db/postgres/itemmapper.php
index 86b63f23b..593a0719a 100644
--- a/db/postgres/itemmapper.php
+++ b/db/postgres/itemmapper.php
@@ -13,16 +13,14 @@
namespace OCA\News\Db\Postgres;
-use \OCA\News\Core\Db;
-use \OCA\News\Db\DoesNotExistException;
-use \OCA\News\Db\MultipleObjectsReturnedException;
-use \OCA\News\Db\Mapper;
+use \OCP\IDb;
+
use \OCA\News\Db\StatusFlag;
class ItemMapper extends \OCA\News\Db\ItemMapper {
- public function __construct(Db $db){
+ public function __construct(IDb $db){
parent::__construct($db);
}
@@ -41,7 +39,7 @@ class ItemMapper extends \OCA\News\Db\ItemMapper {
'WHERE NOT ((`items`.`status` & ?) > 0) ' .
'GROUP BY `items`.`feed_id`, `feeds`.`articles_per_update` ' .
'HAVING COUNT(*) > ?';
- $params = array($status, $threshold);
+ $params = [$status, $threshold];
$result = $this->execute($sql, $params);
while($row = $result->fetch()) {
@@ -50,7 +48,7 @@ class ItemMapper extends \OCA\News\Db\ItemMapper {
$limit = $size - $threshold;
if($limit > 0) {
- $params = array($status, $row['feed_id'], $limit);
+ $params = [$status, $row['feed_id'], $limit];
$sql = 'DELETE FROM `*PREFIX*news_items` ' .
'WHERE `id` IN (' .