Skip to content

Commit 214fb55

Browse files
committed
Merge branch '6.0'
2 parents 59f5913 + a386ae8 commit 214fb55

File tree

274 files changed

+3121
-1082
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+3121
-1082
lines changed

.php-cs-fixer.dist.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
'return_type_declaration' => true,
6767
'static_lambda' => true,
6868

69-
'fully_qualified_strict_types' => true,
69+
'fully_qualified_strict_types' => ['leading_backslash_in_global_namespace' => true],
7070
'no_leading_import_slash' => true,
7171
'no_unused_imports' => true,
7272
'ordered_imports' => true,

XSD/acpMenu.xsd

+6-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@
3434
</xs:complexType>
3535

3636
<xs:complexType name="acpmenuitem_icon">
37-
<xs:attribute name="solid" type="xs:boolean" />
37+
<xs:simpleContent>
38+
<xs:extension base="woltlab_varchar">
39+
<xs:attribute name="solid" type="xs:boolean" />
40+
</xs:extension>
41+
</xs:simpleContent>
3842
</xs:complexType>
3943

4044
<!-- imported/updated acp menu item element type -->
@@ -53,4 +57,4 @@
5357
</xs:extension>
5458
</xs:complexContent>
5559
</xs:complexType>
56-
</xs:schema>
60+
</xs:schema>

XSD/bbcode.xsd

+7-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@
3434
</xs:complexType>
3535

3636
<xs:complexType name="bbcode_icon">
37-
<xs:attribute name="solid" type="xs:boolean" />
37+
<xs:simpleContent>
38+
<xs:extension base="woltlab_varchar">
39+
<xs:attribute name="solid" type="xs:boolean" />
40+
</xs:extension>
41+
</xs:simpleContent>
3842
</xs:complexType>
3943

4044
<!-- imported/updated page menu item element -->
@@ -57,7 +61,7 @@
5761

5862
<xs:complexType name="attributes_element">
5963
<xs:sequence>
60-
<xs:element name="attribute" type="attribute_element" minOccurs="1" />
64+
<xs:element name="attribute" type="attribute_element" minOccurs="1" maxOccurs="unbounded" />
6165
</xs:sequence>
6266
</xs:complexType>
6367

@@ -77,4 +81,4 @@
7781
<xs:complexType name="attribute_element_basic">
7882
<xs:attribute name="name" type="xs:unsignedInt" use="required" />
7983
</xs:complexType>
80-
</xs:schema>
84+
</xs:schema>

XSD/cronjob.xsd

+22-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<!-- The file "cronjobs.xsd" is used for xml-files which installs, updates or deletes searchable cronjobs. -->
2+
<!-- The file "cronjobs.xsd" is used for xml-files which installs, updates or deletes cronjobs. -->
33
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.woltlab.com" targetNamespace="http://www.woltlab.com" elementFormDefault="qualified">
44
<!-- include types -->
55
<xs:include schemaLocation="types.xsd" />
@@ -30,27 +30,23 @@
3030

3131
<!-- cronjob element type -->
3232
<xs:complexType name="cronjob_import">
33-
<xs:complexContent>
34-
<xs:extension base="cronjob_delete">
35-
<xs:choice maxOccurs="unbounded" minOccurs="0">
36-
<xs:element name="description" type="description_element" minOccurs="0" maxOccurs="unbounded" />
37-
<xs:element name="expression" type="woltlab_varchar" minOccurs="1" />
38-
<xs:element name="canbeedited" type="woltlab_boolean" minOccurs="0" default="1" />
39-
<xs:element name="canbedisabled" type="woltlab_boolean" minOccurs="0" default="1" />
40-
<xs:element name="isdisabled" type="woltlab_boolean" minOccurs="0" default="0" />
41-
<xs:element name="options" type="xs:string" minOccurs="0" />
42-
</xs:choice>
43-
</xs:extension>
44-
</xs:complexContent>
33+
<xs:choice maxOccurs="unbounded">
34+
<xs:element name="classname" type="woltlab_varchar" minOccurs="1" maxOccurs="1" />
35+
<xs:element name="description" type="description_element" minOccurs="0" maxOccurs="unbounded" />
36+
<xs:element name="expression" type="expression_element" minOccurs="1" maxOccurs="1" />
37+
<xs:element name="canbeedited" type="woltlab_boolean" minOccurs="0" maxOccurs="1" default="1" />
38+
<xs:element name="canbedisabled" type="woltlab_boolean" minOccurs="0" maxOccurs="1" default="1" />
39+
<xs:element name="isdisabled" type="woltlab_boolean" minOccurs="0" maxOccurs="1" default="0" />
40+
<xs:element name="options" type="xs:string" minOccurs="0" maxOccurs="1" />
41+
</xs:choice>
42+
<xs:attribute name="name" type="woltlab_varchar" use="required" />
4543
</xs:complexType>
4644

4745
<xs:complexType name="cronjob_delete">
46+
<xs:all>
47+
<xs:element name="classname" type="woltlab_varchar_nullable" minOccurs="0" />
48+
</xs:all>
4849
<xs:attribute name="name" type="woltlab_varchar" use="optional" />
49-
<xs:complexContent>
50-
<xs:all>
51-
<xs:element name="classname" type="woltlab_varchar_nullable" minOccurs="0" />
52-
</xs:all>
53-
</xs:complexContent>
5450
</xs:complexType>
5551

5652
<xs:complexType name="description_element">
@@ -60,4 +56,12 @@
6056
</xs:extension>
6157
</xs:simpleContent>
6258
</xs:complexType>
59+
60+
<xs:complexType name="expression_element">
61+
<xs:simpleContent>
62+
<xs:extension base="woltlab_varchar">
63+
<xs:attribute name="type" type="woltlab_varchar" use="optional" />
64+
</xs:extension>
65+
</xs:simpleContent>
66+
</xs:complexType>
6367
</xs:schema>

XSD/language.xsd

+12-8
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@
77
<!-- data element -->
88
<xs:element name="language">
99
<xs:complexType>
10-
<!-- deprecated since 5.5 -->
11-
<xs:sequence>
12-
<xs:element name="category" type="category" maxOccurs="unbounded" />
13-
</xs:sequence>
14-
<!-- /deprecated since 5.5 -->
15-
<xs:element name="import" type="import" minOccurs="0" />
16-
<xs:element name="delete" type="delete" minOccurs="0" />
10+
<xs:choice>
11+
<!-- deprecated since 5.5 -->
12+
<xs:sequence>
13+
<xs:element name="category" type="category" maxOccurs="unbounded" />
14+
</xs:sequence>
15+
<!-- /deprecated since 5.5 -->
16+
<xs:sequence>
17+
<xs:element name="import" type="import" minOccurs="0" />
18+
<xs:element name="delete" type="delete" minOccurs="0" />
19+
</xs:sequence>
20+
</xs:choice>
1721
<xs:attribute name="languagecode" type="woltlab_varchar" use="required" />
1822
<xs:attribute name="languagename" type="woltlab_varchar" use="optional" />
1923
<xs:attribute name="countrycode" type="woltlab_varchar" use="optional" />
@@ -46,4 +50,4 @@
4650
<xs:complexType name="item" mixed="true">
4751
<xs:attribute name="name" type="woltlab_varchar" use="required" />
4852
</xs:complexType>
49-
</xs:schema>
53+
</xs:schema>

XSD/objectType.xsd

+24-2
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,37 @@
4343
<xs:element name="allowcontent" type="woltlab_boolean" minOccurs="0" />
4444
<xs:element name="allowsidebar" type="woltlab_boolean" minOccurs="0" />
4545
<xs:element name="nicevalue" type="xs:integer" minOccurs="0" />
46+
<xs:element name="options" type="woltlab_varchar_nullable" minOccurs="0" />
47+
<xs:element name="supportsReactions" type="woltlab_boolean" minOccurs="0" />
48+
<xs:element name="searchindex" type="woltlab_varchar_nullable" minOccurs="0" />
49+
<xs:element name="enableToc" type="woltlab_boolean" minOccurs="0" />
50+
<xs:element name="disallowedBBCodesPermission" type="woltlab_varchar_nullable" minOccurs="0" />
51+
<xs:element name="tableName" type="woltlab_varchar_nullable" minOccurs="0" />
52+
<xs:element name="tablePrimaryKey" type="woltlab_varchar_nullable" minOccurs="0" />
53+
<xs:element name="default" type="woltlab_varchar_nullable" minOccurs="0" />
54+
<xs:element name="conditiongroup" type="woltlab_varchar_nullable" minOccurs="0" />
55+
<xs:element name="propertyname" type="woltlab_varchar_nullable" minOccurs="0" />
56+
<xs:element name="minvalue" type="woltlab_varchar_nullable" minOccurs="0" />
57+
<xs:element name="conditionobject" type="woltlab_varchar_nullable" minOccurs="0" />
58+
<xs:element name="includeguests" type="woltlab_boolean" minOccurs="0" />
59+
<xs:element name="cssclassname" type="woltlab_varchar_nullable" minOccurs="0" />
60+
<xs:element name="action" type="woltlab_varchar_nullable" minOccurs="0" />
61+
<xs:element name="permissions" type="woltlab_varchar_nullable" minOccurs="0" />
62+
<xs:element name="ignoreZeroTime" type="woltlab_boolean" minOccurs="0" />
63+
<xs:element name="priority" type="woltlab_varchar_nullable" minOccurs="0" />
64+
<xs:element name="changeFreq" type="woltlab_varchar_nullable" minOccurs="0" />
65+
<xs:element name="rebuildTime" type="woltlab_varchar_nullable" minOccurs="0" />
66+
<xs:element name="icon" type="woltlab_varchar_nullable" minOccurs="0" />
67+
4668
</xs:all>
4769
</xs:complexType>
4870

4971
<!-- delete element type -->
5072
<xs:complexType name="type_delete">
51-
<xs:attribute name="name" type="woltlab_varchar" use="required" />
5273
<xs:all>
5374
<xs:element name="name" type="woltlab_varchar_nullable" minOccurs="0" />
5475
<xs:element name="definitionname" type="woltlab_varchar_nullable" minOccurs="0" />
5576
</xs:all>
77+
<xs:attribute name="name" type="woltlab_varchar" use="required" />
5678
</xs:complexType>
57-
</xs:schema>
79+
</xs:schema>

XSD/option.xsd

+5
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@
7272
<xs:element name="suffix" type="xs:string" minOccurs="0" />
7373
<xs:element name="minvalue" type="xs:int" minOccurs="0" />
7474
<xs:element name="maxvalue" type="xs:int" minOccurs="0" />
75+
<xs:element name="minlength" type="xs:int" minOccurs="0" />
76+
<xs:element name="maxlength" type="xs:int" minOccurs="0" />
77+
<xs:element name="allowemptyvalue" type="woltlab_boolean" minOccurs="0" />
78+
<xs:element name="disableAutocomplete" type="woltlab_boolean" minOccurs="0" />
79+
<xs:element name="issortable" type="woltlab_boolean" minOccurs="0" />
7580
</xs:all>
7681
</xs:extension>
7782
</xs:complexContent>

XSD/packageUpdateServer.xsd

+1-2
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,8 @@
8383
<xs:sequence>
8484
<xs:element minOccurs="0" ref="fromversions" />
8585
<xs:element minOccurs="0" ref="requiredpackages" />
86-
<xs:element ref="updatetype" />
8786
<xs:element ref="timestamp" />
88-
<xs:element ref="versiontype" />
87+
<xs:element name="versiontype" type="woltlab_varchar" />
8988
<xs:element ref="license" />
9089
</xs:sequence>
9190
<xs:attribute name="name" use="required" />

XSD/userGroupOption.xsd

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,11 @@
7171
<xs:element name="usersonly" type="woltlab_boolean" minOccurs="0" />
7272
<xs:element name="wildcard" type="woltlab_varchar_nullable" minOccurs="0" />
7373
<xs:element name="minvalue" type="xs:unsignedInt" minOccurs="0" />
74+
<xs:element name="maxvalue" type="xs:unsignedInt" minOccurs="0" />
7475
<xs:element name="excludedInTinyBuild" type="woltlab_boolean" minOccurs="0" />
76+
<xs:element name="suffix" type="woltlab_varchar" minOccurs="0" />
7577
</xs:all>
7678
</xs:extension>
7779
</xs:complexContent>
7880
</xs:complexType>
79-
</xs:schema>
81+
</xs:schema>

XSD/userMenu.xsd

+6-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@
3434
</xs:complexType>
3535

3636
<xs:complexType name="usermenuitem_icon">
37-
<xs:attribute name="solid" type="xs:boolean" />
37+
<xs:simpleContent>
38+
<xs:extension base="woltlab_varchar">
39+
<xs:attribute name="solid" type="xs:boolean" />
40+
</xs:extension>
41+
</xs:simpleContent>
3842
</xs:complexType>
3943

4044
<!-- imported/updated page menu item element -->
@@ -53,4 +57,4 @@
5357
</xs:extension>
5458
</xs:complexContent>
5559
</xs:complexType>
56-
</xs:schema>
60+
</xs:schema>

XSD/userOption.xsd

+2
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@
8888
<xs:element name="options" type="xs:string" minOccurs="0" />
8989
<xs:element name="permissions" type="xs:string" minOccurs="0" />
9090
<xs:element name="isdisabled" type="woltlab_boolean" minOccurs="0" />
91+
<xs:element name="messageObjectType" type="woltlab_varchar" minOccurs="0" />
92+
<xs:element name="contentpattern" type="xs:string" minOccurs="0" />
9193
</xs:all>
9294
</xs:extension>
9395
</xs:complexContent>

com.woltlab.wcf/package.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<packagedescription>Free CMS and web-framework, designed for awesome websites and communities.</packagedescription>
66
<packagedescription language="de">Freies CMS und Web-Framework, das eindrucksvolle Websites und Communities ermöglicht.</packagedescription>
77
<isapplication>1</isapplication>
8-
<version>6.0.6</version>
9-
<date>2024-01-01</date>
8+
<version>6.0.10</version>
9+
<date>2024-02-22</date>
1010
</packageinformation>
1111

1212
<authorinformation>
@@ -50,7 +50,7 @@
5050
<instruction type="script">acp/install_com.woltlab.wcf_step2.php</instruction>
5151
</instructions>
5252

53-
<instructions type="update" fromversion="6.0.5">
53+
<instructions type="update" fromversion="6.0.9">
5454
<instruction type="file">files_update.tar</instruction>
5555
</instructions>
5656
</package>

com.woltlab.wcf/templates/__menu.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{if $menuItemNode->getOutstandingItems() > 0}
1010
<span class="boxMenuLinkOutstandingItems badge badgeUpdate" aria-label="{lang}wcf.page.menu.outstandingItems{/lang}">{#$menuItemNode->getOutstandingItems()}</span>
1111
{/if}
12-
{if $menuItemNode->hasChildren()}
12+
{if $menuIdentifier == 'com.woltlab.wcf.MainMenu' && $menuItemNode->hasChildren() && $menuItemNode->getDepth() == 1}
1313
{icon name='caret-down' type='solid'}
1414
{/if}
1515
</a>

com.woltlab.wcf/templates/email_dailyNotification.tpl

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
{* variable definition for full backwards-compatibility *}
2+
{if !$notificationCount|isset}{assign var=notificationCount value=$notifications|count}{/if}
3+
{if !$maximum|isset}{assign var=maximum value=$notificationCount}{/if}
4+
{if !$remaining|isset}{assign var=remaining value=0}{/if}
15
{if $mimeType === 'text/plain'}
26
{capture assign='content'}
37
{lang}wcf.user.notification.mail.daily.plaintext.intro{/lang}

com.woltlab.wcf/templates/messageOptionType.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<textarea id="{$option->optionName}" name="values[{$option->optionName}]" cols="40" rows="10"{if $option->required} required{/if} class="wysiwygTextarea" data-disable-attachments="true">{$value}</textarea>
1+
<textarea id="{$option->optionName}" name="values[{$option->optionName}]" cols="40" rows="10" class="wysiwygTextarea" data-disable-attachments="true">{$value}</textarea>
22
{include file='shared_wysiwyg' wysiwygSelector=$option->optionName}
33

44
<script data-relocate="true">

ts/WoltLabSuite/Core/Ajax/Backend.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class SetupRequest {
4242
}
4343

4444
let ignoreConnectionErrors = false;
45-
window.addEventListener("unload", () => (ignoreConnectionErrors = true));
45+
window.addEventListener("beforeunload", () => (ignoreConnectionErrors = true));
4646

4747
class BackendRequest {
4848
readonly #url: string;

ts/WoltLabSuite/Core/Bootstrap.ts

+37-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import * as UiObjectActionToggle from "./Ui/Object/Action/Toggle";
3131
import { init as initSearch } from "./Ui/Search";
3232
import { PageMenuMainProvider } from "./Ui/Page/Menu/Main/Provider";
3333
import { whenFirstSeen } from "./LazyLoader";
34-
import { adoptPageOverlayContainer } from "./Helper/PageOverlay";
34+
import { adoptPageOverlayContainer, getPageOverlayContainer } from "./Helper/PageOverlay";
3535

3636
// perfectScrollbar does not need to be bound anywhere, it just has to be loaded for WCF.js
3737
import "perfect-scrollbar";
@@ -168,4 +168,40 @@ export function setup(options: BoostrapOptions): void {
168168
whenFirstSeen("[data-google-maps-geocoding]", () => {
169169
void import("./Component/GoogleMaps/Geocoding").then(({ setup }) => setup());
170170
});
171+
172+
// Move the reCAPTCHA widget overlay to the `pageOverlayContainer`
173+
// when widget form elements are placed in a dialog.
174+
const observer = new MutationObserver((mutations) => {
175+
for (const mutation of mutations) {
176+
for (const node of mutation.addedNodes) {
177+
if (!(node instanceof HTMLElement)) {
178+
continue;
179+
}
180+
181+
if (node.querySelector(".g-recaptcha-bubble-arrow") === null) {
182+
continue;
183+
}
184+
185+
const iframe = node.querySelector("iframe");
186+
if (!iframe) {
187+
continue;
188+
}
189+
const name = "a-" + iframe.name.split("-")[1];
190+
const widget = document.querySelector(`iframe[name="${name}"]`);
191+
if (!widget) {
192+
continue;
193+
}
194+
const dialog = widget.closest("woltlab-core-dialog");
195+
if (!dialog) {
196+
continue;
197+
}
198+
199+
getPageOverlayContainer().append(node);
200+
node.classList.add("g-recaptcha-container");
201+
}
202+
}
203+
});
204+
observer.observe(document.body, {
205+
childList: true,
206+
});
171207
}

ts/WoltLabSuite/Core/Component/Ckeditor.ts

+7
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,12 @@ function hasToolbarButton(items: CKEditor5.Core.ToolbarConfigItem[], name: strin
259259
return false;
260260
}
261261

262+
function notifyOfDataChanges(editor: CKEditor5.ClassicEditor.ClassicEditor, element: HTMLElement): void {
263+
editor.model.document.on("change:data", () => {
264+
dispatchToCkeditor(element).changeData();
265+
});
266+
}
267+
262268
export async function setupCkeditor(
263269
element: HTMLElement,
264270
features: Features,
@@ -320,6 +326,7 @@ export async function setupCkeditor(
320326
}
321327

322328
setupSubmitShortcut(ckeditor);
329+
notifyOfDataChanges(cke, element);
323330

324331
const enableDebug = window.ENABLE_DEBUG_MODE && window.ENABLE_DEVELOPER_TOOLS;
325332
if (enableDebug && Devtools._internal_.editorInspector()) {

0 commit comments

Comments
 (0)