aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2024-07-01 13:37:06 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2024-07-01 14:40:28 +0200
commitc3895990c55f6aebb5e28066764879f3eb2bb3ff (patch)
treef2690e98a5db0532eeaa1888afb65f21d3f19c22 /apps/dav/lib
parentdb5fbe46ab326d6009de8f743df6f44aac5b3e27 (diff)
downloadnextcloud-server-c3895990c55f6aebb5e28066764879f3eb2bb3ff.tar.gz
nextcloud-server-c3895990c55f6aebb5e28066764879f3eb2bb3ff.zip
fix(BuildSocialSearchIndexBackgroundJob): offset not applied
with more than 100 results, this job may never finish Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php b/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php
index 231749521be..05ad95c595c 100644
--- a/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php
+++ b/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php
@@ -26,6 +26,7 @@ use OC\BackgroundJob\QueuedJob;
use OCA\DAV\CardDAV\CardDavBackend;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJobList;
+use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
use OCP\ILogger;
@@ -98,6 +99,7 @@ class BuildSocialSearchIndexBackgroundJob extends QueuedJob {
->from('cards', 'c')
->orderBy('id', 'ASC')
->where($query->expr()->like('carddata', $query->createNamedParameter('%SOCIALPROFILE%')))
+ ->andWhere($query->expr()->gt('id', $query->createNamedParameter((int)$offset, IQueryBuilder::PARAM_INT)))
->setMaxResults(100);
$social_cards = $query->execute()->fetchAll();