Skip to content

Commit 8b5928f

Browse files
Merge pull request #60606 from nextcloud/backport/60461/stable34
[stable34] fix(dav): Skip removal of classified activity when not generated anymore
2 parents 9000f29 + 99f7297 commit 8b5928f

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

apps/dav/lib/Migration/RemoveClassifiedEventActivity.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
namespace OCA\DAV\Migration;
1010

1111
use OCA\DAV\CalDAV\CalDavBackend;
12+
use OCP\AppFramework\Services\IAppConfig;
1213
use OCP\IDBConnection;
1314
use OCP\Migration\IOutput;
1415
use OCP\Migration\IRepairStep;
@@ -17,6 +18,7 @@ class RemoveClassifiedEventActivity implements IRepairStep {
1718

1819
public function __construct(
1920
private IDBConnection $connection,
21+
private IAppConfig $appConfig,
2022
) {
2123
}
2224

@@ -33,12 +35,17 @@ public function getName() {
3335
*/
3436
#[\Override]
3537
public function run(IOutput $output) {
38+
if ($this->appConfig->getAppValueBool('checked_for_classified_activity')) {
39+
return;
40+
}
41+
3642
if (!$this->connection->tableExists('activity')) {
3743
return;
3844
}
3945

4046
$deletedEvents = $this->removePrivateEventActivity();
4147
$deletedEvents += $this->removeConfidentialUncensoredEventActivity();
48+
$this->appConfig->setAppValueBool('checked_for_classified_activity', true);
4249

4350
$output->info("Removed $deletedEvents activity entries");
4451
}

0 commit comments

Comments
 (0)