aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2024-07-01 13:37:06 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-07-01 16:38:33 +0000
commit19192bb0376923062fcbeac3387718f7d1dedd2d (patch)
tree104f5fb7464856e1d155864e039020e3773b5072 /apps/dav/lib
parent35b6745e1425387694126d473bc8a6225eaeacc3 (diff)
downloadnextcloud-server-19192bb0376923062fcbeac3387718f7d1dedd2d.tar.gz
nextcloud-server-19192bb0376923062fcbeac3387718f7d1dedd2d.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 9a688970597..9881d2903cb 100644
--- a/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php
+++ b/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php
@@ -30,6 +30,7 @@ use OCA\DAV\CardDAV\CardDavBackend;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJobList;
use OCP\BackgroundJob\QueuedJob;
+use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
use Psr\Log\LoggerInterface;
@@ -77,6 +78,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->executeQuery()->fetchAll();