aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-05-05 10:35:25 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-05-05 10:35:25 +0200
commit99f2fa73d1c386a6aa9c5464c576ac4a9d086ea4 (patch)
tree599c0fc8c90251104092a365d0d461b0c0e06a07 /apps/files_trashbin
parent865661ed75a542245abcc6639adee769a13267d0 (diff)
downloadnextcloud-server-99f2fa73d1c386a6aa9c5464c576ac4a9d086ea4.tar.gz
nextcloud-server-99f2fa73d1c386a6aa9c5464c576ac4a9d086ea4.zip
Fix usage of rename executeUpdate
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r--apps/files_trashbin/lib/Trashbin.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php
index 537f774efaa..01ee260985c 100644
--- a/apps/files_trashbin/lib/Trashbin.php
+++ b/apps/files_trashbin/lib/Trashbin.php
@@ -226,7 +226,7 @@ class Trashbin {
->setValue('timestamp', $query->createNamedParameter($timestamp))
->setValue('location', $query->createNamedParameter($targetLocation))
->setValue('user', $query->createNamedParameter($user));
- $result = $query->executeUpdate();
+ $result = $query->executeStatement();
if (!$result) {
\OC::$server->getLogger()->error('trash bin database couldn\'t be updated for the files owner', ['app' => 'files_trashbin']);
}
@@ -353,7 +353,7 @@ class Trashbin {
->setValue('timestamp', $query->createNamedParameter($timestamp))
->setValue('location', $query->createNamedParameter($location))
->setValue('user', $query->createNamedParameter($owner));
- $result = $query->executeUpdate();
+ $result = $query->executeStatement();
if (!$result) {
\OC::$server->getLogger()->error('trash bin database couldn\'t be updated', ['app' => 'files_trashbin']);
}
@@ -516,7 +516,7 @@ class Trashbin {
->where($query->expr()->eq('user', $query->createNamedParameter($user)))
->andWhere($query->expr()->eq('id', $query->createNamedParameter($filename)))
->andWhere($query->expr()->eq('timestamp', $query->createNamedParameter($timestamp)));
- $query->executeUpdate();
+ $query->executeStatement();
}
return true;
@@ -606,7 +606,7 @@ class Trashbin {
$query = \OC::$server->getDatabaseConnection()->getQueryBuilder();
$query->delete('files_trash')
->where($query->expr()->eq('user', $query->createNamedParameter($user)));
- $query->executeUpdate();
+ $query->executeStatement();
// Bulk PostDelete-Hook
\OC_Hook::emit('\OCP\Trashbin', 'deleteAll', ['paths' => $filePaths]);
@@ -660,7 +660,7 @@ class Trashbin {
->where($query->expr()->eq('user', $query->createNamedParameter($user)))
->andWhere($query->expr()->eq('id', $query->createNamedParameter($filename)))
->andWhere($query->expr()->eq('timestamp', $query->createNamedParameter($timestamp)));
- $query->executeUpdate();
+ $query->executeStatement();
$file = $filename . '.d' . $timestamp;
} else {
@@ -746,7 +746,7 @@ class Trashbin {
$query = \OC::$server->getDatabaseConnection()->getQueryBuilder();
$query->delete('files_trash')
->where($query->expr()->eq('user', $query->createNamedParameter($uid)));
- return (bool) $query->executeUpdate();
+ return (bool) $query->executeStatement();
}
/**