Skip to content

Commit 3013d20

Browse files
committed
Add the information to the ACP Status Message box that the Rebuild Data must be performed for notes.
1 parent 9e8a1d5 commit 3013d20

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

wcfsetup/install/files/lib/system/acp/dashboard/box/StatusMessageAcpDashboardBox.class.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,13 @@ private function getMigrationMessage(): array
283283
{
284284
$event = new MigrationCollecting();
285285
EventHandler::getInstance()->fire($event);
286+
286287
if ($this->userGroupAssignmentHasLegacyObjects()) {
287288
$event->migrationNeeded(WCF::getLanguage()->get('wcf.acp.group.assignment'));
288289
}
290+
if ($this->noticeHasLegacyObjects()) {
291+
$event->migrationNeeded(WCF::getLanguage()->get('wcf.acp.notice.list'));
292+
}
289293

290294
if ($event->needsMigration() === []) {
291295
return [];
@@ -311,4 +315,15 @@ private function userGroupAssignmentHasLegacyObjects(): bool
311315

312316
return $statement->fetchColumn() > 0;
313317
}
318+
319+
private function noticeHasLegacyObjects(): bool
320+
{
321+
$sql = "SELECT COUNT(*) AS count
322+
FROM wcf1_notice
323+
WHERE isLegacy = ?";
324+
$statement = WCF::getDB()->prepare($sql);
325+
$statement->execute([1]);
326+
327+
return $statement->fetchColumn() > 0;
328+
}
314329
}

0 commit comments

Comments
 (0)