Skip to content

Commit

Permalink
Merge branch '6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
TimWolla committed Oct 13, 2023
2 parents 8f2e9f6 + e16afcc commit d591e73
Show file tree
Hide file tree
Showing 38 changed files with 240 additions and 129 deletions.
14 changes: 5 additions & 9 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.0 RC 2</version>
<date>2023-09-28</date>
<version>6.0.0</version>
<date>2023-10-11</date>
</packageinformation>

<authorinformation>
Expand Down Expand Up @@ -132,17 +132,13 @@ tar cvf com.woltlab.wcf/files_pre_check.tar -C wcfsetup/install/files/ \
</instructions>

<!--
Include in the update RC 1 → RC 2:
<instruction type="script" run="standalone">acp/update_com.woltlab.wcf_6.0_license.php</instruction>
Rerun the update script for trophies to fix any broken fallback values:
<instruction type="script" run="standalone">acp/update_com.woltlab.wcf_6.0_trophies.php</instruction>
-->

<instructions type="update" fromversion="6.0.0 RC 1">
<instruction type="acpTemplate">acptemplates_update.tar</instruction>
<instructions type="update" fromversion="6.0.0 RC 2">
<instruction type="file">files_update.tar</instruction>
<instruction type="template">templates_update.tar</instruction>
<instruction type="script" run="standalone">acp/update_com.woltlab.wcf_6.0_license.php</instruction>
<instruction type="language"/>
<instruction type="acpMenu"/>
</instructions>
</package>
2 changes: 1 addition & 1 deletion com.woltlab.wcf/templates/accountManagement.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
{if $__wcf->session->getVar('__3rdPartyProvider') === 'twitter' && $__wcf->session->getVar('__oauthUser')}
<label><input type="checkbox" name="twitterConnect" value="1"{if $twitterConnect} checked{/if}> {lang}wcf.user.3rdparty.twitter.connect{/lang}</label>
{else}
<a href="{link controller='TwitterAuth'}{/link}" class="thirdPartyLoginButton twitterLoginButton button">{icon size=24 name='twitter' type='brand'} <span>{lang}wcf.user.3rdparty.twitter.connect{/lang}</span></a>
<a href="{link controller='TwitterAuth'}{/link}" class="thirdPartyLoginButton twitterLoginButton button">{icon size=24 name='x-twitter' type='brand'} <span>{lang}wcf.user.3rdparty.twitter.connect{/lang}</span></a>
{/if}
</dd>
</dl>
Expand Down
2 changes: 1 addition & 1 deletion com.woltlab.wcf/templates/headIncludeJavaScript.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ window.addEventListener('pageshow', function(event) {
{assign var='__shareProviders' value="\n"|explode:SHARE_BUTTONS_PROVIDERS}
shareButtonProviders: [
{if 'Facebook'|in_array:$__shareProviders}["Facebook", "{jslang}wcf.message.share.facebook{/jslang}", {icon size=24 name='facebook' type='brand' encodeJson=true}],{/if}
{if 'Twitter'|in_array:$__shareProviders}["Twitter", "{jslang}wcf.message.share.twitter{/jslang}", {icon size=24 name='twitter' type='brand' encodeJson=true}],{/if}
{if 'Twitter'|in_array:$__shareProviders}["Twitter", "{jslang}wcf.message.share.twitter{/jslang}", {icon size=24 name='x-twitter' type='brand' encodeJson=true}],{/if}
{if 'Reddit'|in_array:$__shareProviders}["Reddit", "{jslang}wcf.message.share.reddit{/jslang}", {icon size=24 name='reddit' type='brand' encodeJson=true}],{/if}
{if 'WhatsApp'|in_array:$__shareProviders}["WhatsApp", "{jslang}wcf.message.share.whatsApp{/jslang}", {icon size=24 name='whatsapp' type='brand' encodeJson=true}],{/if}
{if 'LinkedIn'|in_array:$__shareProviders}["LinkedIn", "{jslang}wcf.message.share.linkedIn{/jslang}", {icon size=24 name='linkedin-in' type='brand' encodeJson=true}],{/if}
Expand Down
2 changes: 1 addition & 1 deletion com.woltlab.wcf/templates/login.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
href="{link controller='TwitterAuth'}{/link}"
class="button thirdPartyLoginButton twitterLoginButton"
rel="nofollow"
>{icon size=24 name='twitter' type='brand'} <span>{lang}wcf.user.3rdparty.twitter.login{/lang}</span></a>
>{icon size=24 name='x-twitter' type='brand'} <span>{lang}wcf.user.3rdparty.twitter.login{/lang}</span></a>
</li>
{/if}

Expand Down
8 changes: 7 additions & 1 deletion com.woltlab.wcf/templates/multifactorManageBackup.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
{lang}wcf.user.security.multifactor.backup.print{/lang}
<script>
document.currentScript.closest('button').addEventListener('click', () => {
window.print();
try {
// Safari refuses to execute `window.print()` if there are
// any in-flight requests.
document.execCommand("print", false, null);
} catch {
window.print();
}
});
</script>
</button>
Expand Down
9 changes: 1 addition & 8 deletions com.woltlab.wcf/templates/shareButtons.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,55 +6,48 @@
<li>
<button type="button" class="button messageShareProvider" title="{lang}wcf.message.share.facebook{/lang}" aria-label="{lang}wcf.message.share.facebook{/lang}" data-identifier="Facebook">
{icon size=24 name='facebook' type='brand'}
<span>{lang}wcf.message.share.facebook{/lang}</span>
</button>
</li>
{/if}
{if 'Twitter'|in_array:$__share_buttons_providers}
<li>
<button type="button" class="button messageShareProvider" title="{lang}wcf.message.share.twitter{/lang}" aria-label="{lang}wcf.message.share.twitter{/lang}" data-identifier="Twitter">
{icon size=24 name='twitter' type='brand'}
<span>{lang}wcf.message.share.twitter{/lang}</span>
{icon size=24 name='x-twitter' type='brand'}
</button>
</li>
{/if}
{if 'Reddit'|in_array:$__share_buttons_providers}
<li>
<button type="button" class="button messageShareProvider" title="{lang}wcf.message.share.reddit{/lang}" aria-label="{lang}wcf.message.share.reddit{/lang}" data-identifier="Reddit">
{icon size=24 name='reddit' type='brand'}
<span>{lang}wcf.message.share.reddit{/lang}</span>
</button>
</li>
{/if}
{if 'WhatsApp'|in_array:$__share_buttons_providers}
<li>
<button type="button" class="button messageShareProvider" title="{lang}wcf.message.share.whatsApp{/lang}" aria-label="{lang}wcf.message.share.whatsApp{/lang}" data-identifier="WhatsApp">
{icon size=24 name='whatsapp' type='brand'}
<span>{lang}wcf.message.share.whatsApp{/lang}</span>
</button>
</li>
{/if}
{if 'LinkedIn'|in_array:$__share_buttons_providers}
<li>
<button type="button" href="#" role="button" class="button messageShareProvider" title="{lang}wcf.message.share.linkedIn{/lang}" aria-label="{lang}wcf.message.share.linkedIn{/lang}" data-identifier="LinkedIn">
{icon size=24 name='linkedin-in' type='brand'}
<span>{lang}wcf.message.share.linkedIn{/lang}</span>
</button>
</li>
{/if}
{if 'Pinterest'|in_array:$__share_buttons_providers}
<li>
<button type="button" class="button messageShareProvider" title="{lang}wcf.message.share.pinterest{/lang}" aria-label="{lang}wcf.message.share.pinterest{/lang}" data-identifier="Pinterest">
{icon size=24 name='pinterest' type='brand'}
<span>{lang}wcf.message.share.pinterest{/lang}</span>
</button>
</li>
{/if}
{if 'XING'|in_array:$__share_buttons_providers}
<li>
<button type="button" class="button messageShareProvider" title="{lang}wcf.message.share.xing{/lang}" aria-label="{lang}wcf.message.share.xing{/lang}" data-identifier="XING">
{icon size=24 name='xing' type='brand'}
<span>{lang}wcf.message.share.xing{/lang}</span>
</button>
</li>
{/if}
Expand Down
3 changes: 3 additions & 0 deletions ts/WoltLabSuite/Core/Acp/Ui/Box/Handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ class AcpUiBoxHandler {

Array.from(this.position).forEach((option: HTMLOptionElement) => {
option.hidden = !supportedPositions.includes(option.value);

// Safari does not support [hidden] on option elements.
option.disabled = option.hidden;
});

// Changing the controller can cause the currently selected
Expand Down
14 changes: 13 additions & 1 deletion ts/WoltLabSuite/Core/Component/Ckeditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,19 @@ class Ckeditor {
}

setHtml(html: string): void {
this.#editor.data.set(html);
html = normalizeLegacyHtml(html);

this.#editor.model.change((writer) => {
let range = this.#editor.model.createRangeIn(this.#editor.model.document.getRoot()!);

const viewFragment = this.#editor.data.processor.toView(html);
const modelFragment = this.#editor.data.toModel(viewFragment);

range = this.#editor.model.insertContent(modelFragment, range);

writer.setSelection(range.end);
this.focus();
});
}

removeAll(model: string, attributes: Record<string, string | number | boolean>): void {
Expand Down
1 change: 0 additions & 1 deletion ts/WoltLabSuite/Core/Ui/Message/Share/Dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ function getProviderButtons(): string {
<li>
<button type="button" class="button small messageShareProvider" title="${label}" aria-label="${label}" data-identifier="${identifier}">
${icon}
<span>${label}</span>
</button>
</li>
`;
Expand Down
2 changes: 1 addition & 1 deletion wcfsetup/install/files/acp/templates/styleAdd.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{include file='header' pageTitle='wcf.acp.style.'|concat:$action}

<link href="{@$__wcf->getPath()}acp/style/acpStyleEditor.css" type="text/css" rel="stylesheet">
<link href="{@$__wcf->getPath()}acp/style/acpStyleEditor.css?v={LAST_UPDATE_TIME}" type="text/css" rel="stylesheet">

{js application='wcf' acp='true' file='WCF.ACP.Style'}
{include file='colorPickerJavaScript'}
Expand Down
29 changes: 29 additions & 0 deletions wcfsetup/install/files/acp/update_com.woltlab.wcf_6.0.1.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

/**
* Fixes the style variable value of `individualScssDarkMode`.
*
* @author Alexander Ebert
* @copyright 2001-2023 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*/

use wcf\system\WCF;

// Fix the default value for style variables.
$sql = "UPDATE wcf1_style_variable
SET defaultValueDarkMode = ?
WHERE variableName = ?";
$statement = WCF::getDB()->prepare($sql);
$statement->execute([null, 'individualScssDarkMode']);

// Fixes any bad values stored for existing styles.
$sql = "UPDATE wcf1_style_variable_value
SET variableValueDarkMode = ?
WHERE variableID = (
SELECT variableID
FROM wcf1_style_variable
WHERE variableName = ?
)";
$statement = WCF::getDB()->prepare($sql);
$statement->execute([null, 'individualScssDarkMode']);
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
// If the old icon is unknown we replace it with a placeholder.
\wcf\functions\exception\logThrowable($e);

$newIconName = FontAwesomeIcon::fromString('trophy')->__toString();
$newIconName = FontAwesomeIcon::fromString('trophy;false')->__toString();
}

$statement->execute([
Expand Down

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions wcfsetup/install/files/js/WoltLabSuite.Core.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions wcfsetup/install/files/js/WoltLabSuite.Core.tiny.min.js

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,10 @@ public function assignVariables()
$taintedApplications[$application->getPackage()->packageID] = $application;
}

$availableUpgradeVersion = WCF::AVAILABLE_UPGRADE_VERSION;
// During the RC phase the upgrade should only be offered when the maintenance mode is enabled.
if (!\OFFLINE) {
$availableUpgradeVersion = null;
}

WCF::getTPL()->assign([
'recentlyDisabledCustomValues' => LanguageFactory::getInstance()->countRecentlyDisabledCustomValues(),
'taintedApplications' => $taintedApplications,
'availableUpgradeVersion' => $availableUpgradeVersion,
'availableUpgradeVersion' => WCF::AVAILABLE_UPGRADE_VERSION,
'upgradeOverrideEnabled' => PackageUpdateServer::isUpgradeOverrideEnabled(),
]);
}
Expand Down
2 changes: 1 addition & 1 deletion wcfsetup/install/files/lib/system/WCF.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
\mb_language('uni');

// define current woltlab suite version
\define('WCF_VERSION', '6.0.0 RC 2');
\define('WCF_VERSION', '6.0.0');

// define current unix timestamp
\define('TIME_NOW', \time());
Expand Down
2 changes: 1 addition & 1 deletion wcfsetup/install/files/lib/system/api/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
},
"require": {
"cuyz/valinor": "^1.6.0",
"cuyz/valinor": "^1.6.1",
"dragonmantank/cron-expression": "^3.3.3",
"erusev/parsedown": "^1.7.4",
"ezyang/htmlpurifier": "^4.16",
Expand Down
14 changes: 7 additions & 7 deletions wcfsetup/install/files/lib/system/api/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions wcfsetup/install/files/lib/system/api/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"packages": [
{
"name": "cuyz/valinor",
"version": "1.6.0",
"version_normalized": "1.6.0.0",
"version": "1.6.1",
"version_normalized": "1.6.1.0",
"source": {
"type": "git",
"url": "https://github.com/CuyZ/Valinor.git",
"reference": "f3f3429d90be77f59903923f9bb5ce93c484dfd7"
"reference": "88c6b0f9299088de632d17610efffb54d55adba6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/CuyZ/Valinor/zipball/f3f3429d90be77f59903923f9bb5ce93c484dfd7",
"reference": "f3f3429d90be77f59903923f9bb5ce93c484dfd7",
"url": "https://api.github.com/repos/CuyZ/Valinor/zipball/88c6b0f9299088de632d17610efffb54d55adba6",
"reference": "88c6b0f9299088de632d17610efffb54d55adba6",
"shasum": ""
},
"require": {
Expand All @@ -32,7 +32,7 @@
"rector/rector": "~0.17.0",
"vimeo/psalm": "^5.0"
},
"time": "2023-08-25T10:26:38+00:00",
"time": "2023-10-11T08:40:51+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -66,7 +66,7 @@
],
"support": {
"issues": "https://github.com/CuyZ/Valinor/issues",
"source": "https://github.com/CuyZ/Valinor/tree/1.6.0"
"source": "https://github.com/CuyZ/Valinor/tree/1.6.1"
},
"funding": [
{
Expand Down
Loading

0 comments on commit d591e73

Please sign in to comment.