Skip to content

Commit d58f8dd

Browse files
committed
Merge branch '6.2' into 6.3
2 parents e108470 + 5fceb41 commit d58f8dd

32 files changed

Lines changed: 137 additions & 79 deletions

com.woltlab.wcf/templates/articleList.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
{if $__wcf->user->userID}
4040
<script data-relocate="true">
4141
require(['WoltLabSuite/Core/Ui/Article/MarkAllAsRead'], ({ setup }) => {
42-
setup();
42+
setup(document.getElementById('{unsafe:$listView->getID()|encodeJS}_items'));
4343
});
4444
</script>
4545
{/if}

com.woltlab.wcf/templates/categoryArticleList.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
{if $__wcf->user->userID}
4747
<script data-relocate="true">
4848
require(['WoltLabSuite/Core/Ui/Article/MarkAllAsRead'], ({ setup }) => {
49-
setup();
49+
setup(document.getElementById('{unsafe:$listView->getID()|encodeJS}_items'));
5050
});
5151
</script>
5252
{/if}

ts/WoltLabSuite/Core/Component/Interaction/Bulk/Rpc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Handles bulk interactions that call a RPC endpoint.
2+
* Handles bulk interactions that call an RPC endpoint.
33
*
44
* @author Marcel Werk
55
* @copyright 2001-2025 WoltLab GmbH

ts/WoltLabSuite/Core/Component/Interaction/Rpc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Handles interactions that call a RPC endpoint.
2+
* Handles interactions that call an RPC endpoint.
33
*
44
* @author Marcel Werk
55
* @copyright 2001-2025 WoltLab GmbH

ts/WoltLabSuite/Core/Ui/Article/MarkAllAsRead.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,27 @@
99

1010
import { showDefaultSuccessSnackbar } from "WoltLabSuite/Core/Component/Snackbar";
1111
import { markAllArticlesAsRead } from "WoltLabSuite/Core/Api/Articles/MarkAllArticlesAsRead";
12+
import { promiseMutex } from "WoltLabSuite/Core/Helper/PromiseMutex";
1213

13-
async function markAllAsRead(): Promise<void> {
14+
async function markAllAsRead(listView?: HTMLElement): Promise<void> {
1415
await markAllArticlesAsRead();
1516

16-
document.querySelectorAll(".contentItemList .contentItemBadgeNew").forEach((el: HTMLElement) => el.remove());
17-
document.querySelectorAll(".boxMenu .active .badge").forEach((el: HTMLElement) => el.remove());
17+
if (listView !== undefined) {
18+
listView.dispatchEvent(new CustomEvent("interaction:invalidate-all"));
19+
}
20+
21+
document.querySelectorAll(".boxMenu .active .badgeUpdate").forEach((el: HTMLElement) => el.remove());
1822

1923
showDefaultSuccessSnackbar();
2024
}
2125

22-
export function setup(): void {
26+
export function setup(listView?: HTMLElement): void {
2327
document.querySelectorAll(".markAllAsReadButton").forEach((el: HTMLElement) => {
24-
el.addEventListener("click", (event) => {
25-
event.preventDefault();
26-
27-
void markAllAsRead();
28-
});
28+
el.addEventListener(
29+
"click",
30+
promiseMutex(async () => {
31+
await markAllAsRead(listView);
32+
}),
33+
);
2934
});
3035
}

wcfsetup/install/files/js/WoltLabSuite/Core/Component/Interaction/Bulk/Rpc.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wcfsetup/install/files/js/WoltLabSuite/Core/Component/Interaction/Rpc.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Article/MarkAllAsRead.js

Lines changed: 10 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wcfsetup/install/files/js/WoltLabSuite/WebComponent.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use wcf\data\application\Application;
66
use wcf\page\AbstractPage;
7+
use wcf\system\application\ApplicationHandler;
78
use wcf\system\database\util\PreparedStatementConditionBuilder;
89
use wcf\system\Environment;
910
use wcf\system\exception\SystemException;
@@ -300,9 +301,13 @@ protected function validateMysql()
300301
foreach ($keys as $column => $reference) {
301302
$innerConditionBuilder = new PreparedStatementConditionBuilder(false);
302303
$innerConditionBuilder->add('REFERENCED_TABLE_SCHEMA = ?', [WCF::getDB()->getDatabaseName()]);
303-
$innerConditionBuilder->add('REFERENCED_TABLE_NAME = ?', [$reference['referenceTable']]);
304+
$innerConditionBuilder->add('REFERENCED_TABLE_NAME = ?', [
305+
ApplicationHandler::insertRealDatabaseTableNames($reference['referenceTable'])
306+
]);
304307
$innerConditionBuilder->add('REFERENCED_COLUMN_NAME = ?', [$reference['referenceColumn']]);
305-
$innerConditionBuilder->add('TABLE_NAME = ?', [$table]);
308+
$innerConditionBuilder->add('TABLE_NAME = ?', [
309+
ApplicationHandler::insertRealDatabaseTableNames($table)
310+
]);
306311
$innerConditionBuilder->add('COLUMN_NAME = ?', [$column]);
307312

308313
$conditionBuilder->add('(' . $innerConditionBuilder . ')', $innerConditionBuilder->getParameters());

0 commit comments

Comments
 (0)