Skip to content

Commit

Permalink
Merge branch '6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
dtdesign committed Mar 10, 2024
2 parents 59f5913 + a386ae8 commit 214fb55
Show file tree
Hide file tree
Showing 274 changed files with 3,121 additions and 1,082 deletions.
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
'return_type_declaration' => true,
'static_lambda' => true,

'fully_qualified_strict_types' => true,
'fully_qualified_strict_types' => ['leading_backslash_in_global_namespace' => true],
'no_leading_import_slash' => true,
'no_unused_imports' => true,
'ordered_imports' => true,
Expand Down
8 changes: 6 additions & 2 deletions XSD/acpMenu.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@
</xs:complexType>

<xs:complexType name="acpmenuitem_icon">
<xs:attribute name="solid" type="xs:boolean" />
<xs:simpleContent>
<xs:extension base="woltlab_varchar">
<xs:attribute name="solid" type="xs:boolean" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>

<!-- imported/updated acp menu item element type -->
Expand All @@ -53,4 +57,4 @@
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
</xs:schema>
10 changes: 7 additions & 3 deletions XSD/bbcode.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@
</xs:complexType>

<xs:complexType name="bbcode_icon">
<xs:attribute name="solid" type="xs:boolean" />
<xs:simpleContent>
<xs:extension base="woltlab_varchar">
<xs:attribute name="solid" type="xs:boolean" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>

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

<xs:complexType name="attributes_element">
<xs:sequence>
<xs:element name="attribute" type="attribute_element" minOccurs="1" />
<xs:element name="attribute" type="attribute_element" minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>

Expand All @@ -77,4 +81,4 @@
<xs:complexType name="attribute_element_basic">
<xs:attribute name="name" type="xs:unsignedInt" use="required" />
</xs:complexType>
</xs:schema>
</xs:schema>
40 changes: 22 additions & 18 deletions XSD/cronjob.xsd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!-- The file "cronjobs.xsd" is used for xml-files which installs, updates or deletes searchable cronjobs. -->
<!-- The file "cronjobs.xsd" is used for xml-files which installs, updates or deletes cronjobs. -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.woltlab.com" targetNamespace="http://www.woltlab.com" elementFormDefault="qualified">
<!-- include types -->
<xs:include schemaLocation="types.xsd" />
Expand Down Expand Up @@ -30,27 +30,23 @@

<!-- cronjob element type -->
<xs:complexType name="cronjob_import">
<xs:complexContent>
<xs:extension base="cronjob_delete">
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="description" type="description_element" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="expression" type="woltlab_varchar" minOccurs="1" />
<xs:element name="canbeedited" type="woltlab_boolean" minOccurs="0" default="1" />
<xs:element name="canbedisabled" type="woltlab_boolean" minOccurs="0" default="1" />
<xs:element name="isdisabled" type="woltlab_boolean" minOccurs="0" default="0" />
<xs:element name="options" type="xs:string" minOccurs="0" />
</xs:choice>
</xs:extension>
</xs:complexContent>
<xs:choice maxOccurs="unbounded">
<xs:element name="classname" type="woltlab_varchar" minOccurs="1" maxOccurs="1" />
<xs:element name="description" type="description_element" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="expression" type="expression_element" minOccurs="1" maxOccurs="1" />
<xs:element name="canbeedited" type="woltlab_boolean" minOccurs="0" maxOccurs="1" default="1" />
<xs:element name="canbedisabled" type="woltlab_boolean" minOccurs="0" maxOccurs="1" default="1" />
<xs:element name="isdisabled" type="woltlab_boolean" minOccurs="0" maxOccurs="1" default="0" />
<xs:element name="options" type="xs:string" minOccurs="0" maxOccurs="1" />
</xs:choice>
<xs:attribute name="name" type="woltlab_varchar" use="required" />
</xs:complexType>

<xs:complexType name="cronjob_delete">
<xs:all>
<xs:element name="classname" type="woltlab_varchar_nullable" minOccurs="0" />
</xs:all>
<xs:attribute name="name" type="woltlab_varchar" use="optional" />
<xs:complexContent>
<xs:all>
<xs:element name="classname" type="woltlab_varchar_nullable" minOccurs="0" />
</xs:all>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="description_element">
Expand All @@ -60,4 +56,12 @@
</xs:extension>
</xs:simpleContent>
</xs:complexType>

<xs:complexType name="expression_element">
<xs:simpleContent>
<xs:extension base="woltlab_varchar">
<xs:attribute name="type" type="woltlab_varchar" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:schema>
20 changes: 12 additions & 8 deletions XSD/language.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
<!-- data element -->
<xs:element name="language">
<xs:complexType>
<!-- deprecated since 5.5 -->
<xs:sequence>
<xs:element name="category" type="category" maxOccurs="unbounded" />
</xs:sequence>
<!-- /deprecated since 5.5 -->
<xs:element name="import" type="import" minOccurs="0" />
<xs:element name="delete" type="delete" minOccurs="0" />
<xs:choice>
<!-- deprecated since 5.5 -->
<xs:sequence>
<xs:element name="category" type="category" maxOccurs="unbounded" />
</xs:sequence>
<!-- /deprecated since 5.5 -->
<xs:sequence>
<xs:element name="import" type="import" minOccurs="0" />
<xs:element name="delete" type="delete" minOccurs="0" />
</xs:sequence>
</xs:choice>
<xs:attribute name="languagecode" type="woltlab_varchar" use="required" />
<xs:attribute name="languagename" type="woltlab_varchar" use="optional" />
<xs:attribute name="countrycode" type="woltlab_varchar" use="optional" />
Expand Down Expand Up @@ -46,4 +50,4 @@
<xs:complexType name="item" mixed="true">
<xs:attribute name="name" type="woltlab_varchar" use="required" />
</xs:complexType>
</xs:schema>
</xs:schema>
26 changes: 24 additions & 2 deletions XSD/objectType.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,37 @@
<xs:element name="allowcontent" type="woltlab_boolean" minOccurs="0" />
<xs:element name="allowsidebar" type="woltlab_boolean" minOccurs="0" />
<xs:element name="nicevalue" type="xs:integer" minOccurs="0" />
<xs:element name="options" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="supportsReactions" type="woltlab_boolean" minOccurs="0" />
<xs:element name="searchindex" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="enableToc" type="woltlab_boolean" minOccurs="0" />
<xs:element name="disallowedBBCodesPermission" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="tableName" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="tablePrimaryKey" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="default" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="conditiongroup" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="propertyname" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="minvalue" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="conditionobject" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="includeguests" type="woltlab_boolean" minOccurs="0" />
<xs:element name="cssclassname" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="action" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="permissions" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="ignoreZeroTime" type="woltlab_boolean" minOccurs="0" />
<xs:element name="priority" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="changeFreq" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="rebuildTime" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="icon" type="woltlab_varchar_nullable" minOccurs="0" />

</xs:all>
</xs:complexType>

<!-- delete element type -->
<xs:complexType name="type_delete">
<xs:attribute name="name" type="woltlab_varchar" use="required" />
<xs:all>
<xs:element name="name" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="definitionname" type="woltlab_varchar_nullable" minOccurs="0" />
</xs:all>
<xs:attribute name="name" type="woltlab_varchar" use="required" />
</xs:complexType>
</xs:schema>
</xs:schema>
5 changes: 5 additions & 0 deletions XSD/option.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
<xs:element name="suffix" type="xs:string" minOccurs="0" />
<xs:element name="minvalue" type="xs:int" minOccurs="0" />
<xs:element name="maxvalue" type="xs:int" minOccurs="0" />
<xs:element name="minlength" type="xs:int" minOccurs="0" />
<xs:element name="maxlength" type="xs:int" minOccurs="0" />
<xs:element name="allowemptyvalue" type="woltlab_boolean" minOccurs="0" />
<xs:element name="disableAutocomplete" type="woltlab_boolean" minOccurs="0" />
<xs:element name="issortable" type="woltlab_boolean" minOccurs="0" />
</xs:all>
</xs:extension>
</xs:complexContent>
Expand Down
3 changes: 1 addition & 2 deletions XSD/packageUpdateServer.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@
<xs:sequence>
<xs:element minOccurs="0" ref="fromversions" />
<xs:element minOccurs="0" ref="requiredpackages" />
<xs:element ref="updatetype" />
<xs:element ref="timestamp" />
<xs:element ref="versiontype" />
<xs:element name="versiontype" type="woltlab_varchar" />
<xs:element ref="license" />
</xs:sequence>
<xs:attribute name="name" use="required" />
Expand Down
4 changes: 3 additions & 1 deletion XSD/userGroupOption.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@
<xs:element name="usersonly" type="woltlab_boolean" minOccurs="0" />
<xs:element name="wildcard" type="woltlab_varchar_nullable" minOccurs="0" />
<xs:element name="minvalue" type="xs:unsignedInt" minOccurs="0" />
<xs:element name="maxvalue" type="xs:unsignedInt" minOccurs="0" />
<xs:element name="excludedInTinyBuild" type="woltlab_boolean" minOccurs="0" />
<xs:element name="suffix" type="woltlab_varchar" minOccurs="0" />
</xs:all>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
</xs:schema>
8 changes: 6 additions & 2 deletions XSD/userMenu.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@
</xs:complexType>

<xs:complexType name="usermenuitem_icon">
<xs:attribute name="solid" type="xs:boolean" />
<xs:simpleContent>
<xs:extension base="woltlab_varchar">
<xs:attribute name="solid" type="xs:boolean" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>

<!-- imported/updated page menu item element -->
Expand All @@ -53,4 +57,4 @@
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
</xs:schema>
2 changes: 2 additions & 0 deletions XSD/userOption.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
<xs:element name="options" type="xs:string" minOccurs="0" />
<xs:element name="permissions" type="xs:string" minOccurs="0" />
<xs:element name="isdisabled" type="woltlab_boolean" minOccurs="0" />
<xs:element name="messageObjectType" type="woltlab_varchar" minOccurs="0" />
<xs:element name="contentpattern" type="xs:string" minOccurs="0" />
</xs:all>
</xs:extension>
</xs:complexContent>
Expand Down
6 changes: 3 additions & 3 deletions com.woltlab.wcf/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<packagedescription>Free CMS and web-framework, designed for awesome websites and communities.</packagedescription>
<packagedescription language="de">Freies CMS und Web-Framework, das eindrucksvolle Websites und Communities ermöglicht.</packagedescription>
<isapplication>1</isapplication>
<version>6.0.6</version>
<date>2024-01-01</date>
<version>6.0.10</version>
<date>2024-02-22</date>
</packageinformation>

<authorinformation>
Expand Down Expand Up @@ -50,7 +50,7 @@
<instruction type="script">acp/install_com.woltlab.wcf_step2.php</instruction>
</instructions>

<instructions type="update" fromversion="6.0.5">
<instructions type="update" fromversion="6.0.9">
<instruction type="file">files_update.tar</instruction>
</instructions>
</package>
2 changes: 1 addition & 1 deletion com.woltlab.wcf/templates/__menu.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{if $menuItemNode->getOutstandingItems() > 0}
<span class="boxMenuLinkOutstandingItems badge badgeUpdate" aria-label="{lang}wcf.page.menu.outstandingItems{/lang}">{#$menuItemNode->getOutstandingItems()}</span>
{/if}
{if $menuItemNode->hasChildren()}
{if $menuIdentifier == 'com.woltlab.wcf.MainMenu' && $menuItemNode->hasChildren() && $menuItemNode->getDepth() == 1}
{icon name='caret-down' type='solid'}
{/if}
</a>
Expand Down
4 changes: 4 additions & 0 deletions com.woltlab.wcf/templates/email_dailyNotification.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{* variable definition for full backwards-compatibility *}
{if !$notificationCount|isset}{assign var=notificationCount value=$notifications|count}{/if}
{if !$maximum|isset}{assign var=maximum value=$notificationCount}{/if}
{if !$remaining|isset}{assign var=remaining value=0}{/if}
{if $mimeType === 'text/plain'}
{capture assign='content'}
{lang}wcf.user.notification.mail.daily.plaintext.intro{/lang}
Expand Down
2 changes: 1 addition & 1 deletion com.woltlab.wcf/templates/messageOptionType.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<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>
<textarea id="{$option->optionName}" name="values[{$option->optionName}]" cols="40" rows="10" class="wysiwygTextarea" data-disable-attachments="true">{$value}</textarea>
{include file='shared_wysiwyg' wysiwygSelector=$option->optionName}

<script data-relocate="true">
Expand Down
2 changes: 1 addition & 1 deletion ts/WoltLabSuite/Core/Ajax/Backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class SetupRequest {
}

let ignoreConnectionErrors = false;
window.addEventListener("unload", () => (ignoreConnectionErrors = true));
window.addEventListener("beforeunload", () => (ignoreConnectionErrors = true));

class BackendRequest {
readonly #url: string;
Expand Down
38 changes: 37 additions & 1 deletion ts/WoltLabSuite/Core/Bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import * as UiObjectActionToggle from "./Ui/Object/Action/Toggle";
import { init as initSearch } from "./Ui/Search";
import { PageMenuMainProvider } from "./Ui/Page/Menu/Main/Provider";
import { whenFirstSeen } from "./LazyLoader";
import { adoptPageOverlayContainer } from "./Helper/PageOverlay";
import { adoptPageOverlayContainer, getPageOverlayContainer } from "./Helper/PageOverlay";

// perfectScrollbar does not need to be bound anywhere, it just has to be loaded for WCF.js
import "perfect-scrollbar";
Expand Down Expand Up @@ -168,4 +168,40 @@ export function setup(options: BoostrapOptions): void {
whenFirstSeen("[data-google-maps-geocoding]", () => {
void import("./Component/GoogleMaps/Geocoding").then(({ setup }) => setup());
});

// Move the reCAPTCHA widget overlay to the `pageOverlayContainer`
// when widget form elements are placed in a dialog.
const observer = new MutationObserver((mutations) => {
for (const mutation of mutations) {
for (const node of mutation.addedNodes) {
if (!(node instanceof HTMLElement)) {
continue;
}

if (node.querySelector(".g-recaptcha-bubble-arrow") === null) {
continue;
}

const iframe = node.querySelector("iframe");
if (!iframe) {
continue;
}
const name = "a-" + iframe.name.split("-")[1];
const widget = document.querySelector(`iframe[name="${name}"]`);
if (!widget) {
continue;
}
const dialog = widget.closest("woltlab-core-dialog");
if (!dialog) {
continue;
}

getPageOverlayContainer().append(node);
node.classList.add("g-recaptcha-container");
}
}
});
observer.observe(document.body, {
childList: true,
});
}
7 changes: 7 additions & 0 deletions ts/WoltLabSuite/Core/Component/Ckeditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,12 @@ function hasToolbarButton(items: CKEditor5.Core.ToolbarConfigItem[], name: strin
return false;
}

function notifyOfDataChanges(editor: CKEditor5.ClassicEditor.ClassicEditor, element: HTMLElement): void {
editor.model.document.on("change:data", () => {
dispatchToCkeditor(element).changeData();
});
}

export async function setupCkeditor(
element: HTMLElement,
features: Features,
Expand Down Expand Up @@ -320,6 +326,7 @@ export async function setupCkeditor(
}

setupSubmitShortcut(ckeditor);
notifyOfDataChanges(cke, element);

const enableDebug = window.ENABLE_DEBUG_MODE && window.ENABLE_DEVELOPER_TOOLS;
if (enableDebug && Devtools._internal_.editorInspector()) {
Expand Down
Loading

0 comments on commit 214fb55

Please sign in to comment.