From 3cadb8c97e03823897e19ab488fe0f55fb4ac679 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 15 May 2026 22:20:42 +0200 Subject: [PATCH] fix(dav): Skip removal of classified activity only once Was fixed in Nextcloud 16, so future versions should not generate this anymore. So the delete attempt can be skipped, after doing it once. We are keeping this to ensure it also runs after migrating from ownCloud Signed-off-by: Joas Schilling --- apps/dav/lib/Migration/RemoveClassifiedEventActivity.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php b/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php index f0d208f4f335e..5ad395a5fb2dd 100644 --- a/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php +++ b/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php @@ -9,6 +9,7 @@ namespace OCA\DAV\Migration; use OCA\DAV\CalDAV\CalDavBackend; +use OCP\AppFramework\Services\IAppConfig; use OCP\IDBConnection; use OCP\Migration\IOutput; use OCP\Migration\IRepairStep; @@ -17,6 +18,7 @@ class RemoveClassifiedEventActivity implements IRepairStep { public function __construct( private IDBConnection $connection, + private IAppConfig $appConfig, ) { } @@ -31,12 +33,17 @@ public function getName() { * @inheritdoc */ public function run(IOutput $output) { + if ($this->appConfig->getAppValueBool('checked_for_classified_activity')) { + return; + } + if (!$this->connection->tableExists('activity')) { return; } $deletedEvents = $this->removePrivateEventActivity(); $deletedEvents += $this->removeConfidentialUncensoredEventActivity(); + $this->appConfig->setAppValueBool('checked_for_classified_activity', true); $output->info("Removed $deletedEvents activity entries"); }