summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2016-02-05 15:32:34 +0100
committerJoas Schilling <nickvergessen@owncloud.com>2016-02-05 21:26:30 +0100
commit065141f6f4212dbbca4633b0138f6e5ac3ec4f7a (patch)
tree6b944b545070c272bdde6bbfbf8218fdfe4e4008 /apps/files
parent550f3af2858d41eed3b698e4145dfb690dfbae5d (diff)
downloadnextcloud-server-065141f6f4212dbbca4633b0138f6e5ac3ec4f7a.tar.gz
nextcloud-server-065141f6f4212dbbca4633b0138f6e5ac3ec4f7a.zip
Move casting to IExpressionBuilder
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/lib/backgroundjob/deleteorphaneditems.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files/lib/backgroundjob/deleteorphaneditems.php b/apps/files/lib/backgroundjob/deleteorphaneditems.php
index dc9f781e403..cefa1d655de 100644
--- a/apps/files/lib/backgroundjob/deleteorphaneditems.php
+++ b/apps/files/lib/backgroundjob/deleteorphaneditems.php
@@ -22,6 +22,7 @@
namespace OCA\Files\BackgroundJob;
use OC\BackgroundJob\TimedJob;
+use OCP\DB\QueryBuilder\IQueryBuilder;
/**
* Delete all share entries that have no matching entries in the file cache table.
@@ -111,7 +112,7 @@ class DeleteOrphanedItems extends TimedJob {
*/
protected function cleanComments() {
$qb = $this->connection->getQueryBuilder();
- $deletedEntries = $this->cleanUp('comments', $qb->createFunction('CAST(`object_id` as INT)'), 'object_type');
+ $deletedEntries = $this->cleanUp('comments', $qb->expr()->castColumn('object_id', IQueryBuilder::PARAM_INT), 'object_type');
$this->logger->debug("$deletedEntries orphaned comments deleted", ['app' => 'DeleteOrphanedItems']);
return $deletedEntries;
}
@@ -123,7 +124,7 @@ class DeleteOrphanedItems extends TimedJob {
*/
protected function cleanCommentMarkers() {
$qb = $this->connection->getQueryBuilder();
- $deletedEntries = $this->cleanUp('comments_read_markers', $qb->createFunction('CAST(`object_id` as INT)'), 'object_type');
+ $deletedEntries = $this->cleanUp('comments_read_markers', $qb->expr()->castColumn('object_id', IQueryBuilder::PARAM_INT), 'object_type');
$this->logger->debug("$deletedEntries orphaned comment read marks deleted", ['app' => 'DeleteOrphanedItems']);
return $deletedEntries;
}