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

github.com/nextcloud/notifications.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-04-15 22:40:11 +0300
committerJoas Schilling <coding@schilljs.com>2021-04-15 22:40:11 +0300
commit6ede8411640d20a2799bd4e8bb814aea04db157b (patch)
tree6fbbf62e9319091d6aea673d25a55263899b0f37 /lib
parent2db4ce990715548d8afa835cbcce9e6213b504c1 (diff)
IQueryBuilder::execute() is deprecated
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/PushController.php8
-rw-r--r--lib/Handler.php12
-rw-r--r--lib/Push.php6
3 files changed, 13 insertions, 13 deletions
diff --git a/lib/Controller/PushController.php b/lib/Controller/PushController.php
index a0417de..475daa7 100644
--- a/lib/Controller/PushController.php
+++ b/lib/Controller/PushController.php
@@ -223,7 +223,7 @@ class PushController extends OCSController {
'proxyserver' => $query->createNamedParameter($proxyServer),
'apptype' => $query->createNamedParameter($appType),
]);
- return $query->execute() > 0;
+ return $query->executeUpdate() > 0;
}
/**
@@ -248,7 +248,7 @@ class PushController extends OCSController {
->where($query->expr()->eq('uid', $query->createNamedParameter($user->getUID())))
->andWhere($query->expr()->eq('token', $query->createNamedParameter($token->getId(), IQueryBuilder::PARAM_INT)));
- return $query->execute() !== 0;
+ return $query->executeUpdate() !== 0;
}
/**
@@ -262,7 +262,7 @@ class PushController extends OCSController {
->where($query->expr()->eq('uid', $query->createNamedParameter($user->getUID())))
->andWhere($query->expr()->eq('token', $query->createNamedParameter($token->getId(), IQueryBuilder::PARAM_INT)));
- return $query->execute() !== 0;
+ return $query->executeUpdate() !== 0;
}
/**
@@ -276,6 +276,6 @@ class PushController extends OCSController {
->where($query->expr()->eq('uid', $query->createNamedParameter($user->getUID())))
->andWhere($query->expr()->eq('pushtokenhash', $query->createNamedParameter($pushTokenHash)));
- return $query->execute() !== 0;
+ return $query->executeUpdate() !== 0;
}
}
diff --git a/lib/Handler.php b/lib/Handler.php
index f04960a..85c1661 100644
--- a/lib/Handler.php
+++ b/lib/Handler.php
@@ -54,7 +54,7 @@ class Handler {
$sql = $this->connection->getQueryBuilder();
$sql->insert('notifications');
$this->sqlInsert($sql, $notification);
- $sql->execute();
+ $sql->executeUpdate();
return $sql->getLastInsertId();
}
@@ -72,7 +72,7 @@ class Handler {
$this->sqlWhere($sql, $notification);
- $statement = $sql->execute();
+ $statement = $sql->executeQuery();
$count = (int) $statement->fetchOne();
$statement->closeCursor();
@@ -91,7 +91,7 @@ class Handler {
->from('notifications');
$this->sqlWhere($sql, $notification);
- $statement = $sql->execute();
+ $statement = $sql->executeQuery();
$deleted = [];
$notifications = [];
@@ -150,7 +150,7 @@ class Handler {
$sql->delete('notifications')
->where($sql->expr()->eq('notification_id', $sql->createNamedParameter($id)))
->andWhere($sql->expr()->eq('user', $sql->createNamedParameter($user)));
- return (bool) $sql->execute();
+ return (bool) $sql->executeUpdate();
}
/**
@@ -167,7 +167,7 @@ class Handler {
->from('notifications')
->where($sql->expr()->eq('notification_id', $sql->createNamedParameter($id)))
->andWhere($sql->expr()->eq('user', $sql->createNamedParameter($user)));
- $statement = $sql->execute();
+ $statement = $sql->executeQuery();
$row = $statement->fetch();
$statement->closeCursor();
@@ -197,7 +197,7 @@ class Handler {
->setMaxResults($limit);
$this->sqlWhere($sql, $notification);
- $statement = $sql->execute();
+ $statement = $sql->executeQuery();
$notifications = [];
while ($row = $statement->fetch()) {
diff --git a/lib/Push.php b/lib/Push.php
index f9009c3..0d8d4a8 100644
--- a/lib/Push.php
+++ b/lib/Push.php
@@ -507,7 +507,7 @@ class Push {
->from('notifications_pushhash')
->where($query->expr()->eq('uid', $query->createNamedParameter($uid)));
- $result = $query->execute();
+ $result = $query->executeQuery();
$devices = $result->fetchAll();
$result->closeCursor();
@@ -523,7 +523,7 @@ class Push {
$query->delete('notifications_pushhash')
->where($query->expr()->eq('token', $query->createNamedParameter($tokenId, IQueryBuilder::PARAM_INT)));
- return $query->execute() !== 0;
+ return $query->executeUpdate() !== 0;
}
/**
@@ -535,6 +535,6 @@ class Push {
$query->delete('notifications_pushhash')
->where($query->expr()->eq('deviceidentifier', $query->createNamedParameter($deviceIdentifier)));
- return $query->execute() !== 0;
+ return $query->executeUpdate() !== 0;
}
}