GitHub/WoltLab/WCF.git
23 months agoMerge pull request #5070 from WoltLab/js-template
Tim Düsterhus [Tue, 25 Oct 2022 12:02:27 +0000 (14:02 +0200)]
Merge pull request #5070 from WoltLab/js-template

Clean up JavaScript Templates

23 months agoRemove WCF.Template
Tim Düsterhus [Tue, 25 Oct 2022 11:36:03 +0000 (13:36 +0200)]
Remove WCF.Template

While not officially deprecated, the module-based replacement
WoltLabSuite/Core/Template exists since a while. The implementation based on
naïve string replacement is also very questionable.

23 months agoReplace `WCF.Template` by `WoltLabSuite/Core/Template` in bbcodeAdd.tpl
Tim Düsterhus [Tue, 25 Oct 2022 11:35:33 +0000 (13:35 +0200)]
Replace `WCF.Template` by `WoltLabSuite/Core/Template` in bbcodeAdd.tpl

23 months agoCompletely remove `Core/Template.callbacks` property
Tim Düsterhus [Tue, 25 Oct 2022 11:00:08 +0000 (13:00 +0200)]
Completely remove `Core/Template.callbacks` property

Any attempt to access this resulted in an Error for a long time, it's time to
remove it completely.

23 months agoAdd `null` default value to properties of TDecimalsDatabaseTableColumn and TLengthDat...
Tim Düsterhus [Tue, 25 Oct 2022 10:38:57 +0000 (12:38 +0200)]
Add `null` default value to properties of TDecimalsDatabaseTableColumn and TLengthDatabaseTableColumn

see 3f13d793c2d163827df896effc1bb90b1fa4888f

23 months agoUnbreak WCFSetup
Tim Düsterhus [Tue, 25 Oct 2022 10:15:07 +0000 (12:15 +0200)]
Unbreak WCFSetup

The WCF_UUID option is only available after WCFSetup and installation of
`com.woltlab.wcf` completed.

23 months agoUpdate the visuals of the drop-down menus
Alexander Ebert [Mon, 24 Oct 2022 16:41:03 +0000 (18:41 +0200)]
Update the visuals of the drop-down menus

23 months agoMerge pull request #5068 from HanashiDev/registryhandler-rev
Tim Düsterhus [Mon, 24 Oct 2022 14:49:35 +0000 (16:49 +0200)]
Merge pull request #5068 from HanashiDev/registryhandler-rev

Add proper types to RegistryHandler

23 months agoReplace `empty` in RegistryHandler if possible
Hanashi [Mon, 24 Oct 2022 14:36:56 +0000 (16:36 +0200)]
Replace `empty` in RegistryHandler if possible

23 months agoReplace `prepareStatement` with `prepare` in RegistryHandler
Hanashi [Mon, 24 Oct 2022 14:34:31 +0000 (16:34 +0200)]
Replace `prepareStatement` with `prepare` in RegistryHandler

23 months agoMark properties in `RegistryHandler` as `private`
Hanashi [Mon, 24 Oct 2022 14:32:24 +0000 (16:32 +0200)]
Mark properties in `RegistryHandler` as `private`

23 months agoAdd proper types to `RegistryHandler`
Hanashi [Mon, 24 Oct 2022 14:31:34 +0000 (16:31 +0200)]
Add proper types to `RegistryHandler`

23 months agoMark `RegistryHandler` as `final`
Hanashi [Mon, 24 Oct 2022 14:26:51 +0000 (16:26 +0200)]
Mark `RegistryHandler` as `final`

23 months agoMerge pull request #5056 from WoltLab/package-bootstrap
Tim Düsterhus [Mon, 24 Oct 2022 14:26:48 +0000 (16:26 +0200)]
Merge pull request #5056 from WoltLab/package-bootstrap

Add bootstrapping scripts

23 months agoMerge pull request #5067 from HanashiDev/formbuilder-missing-return-types
Tim Düsterhus [Mon, 24 Oct 2022 14:21:20 +0000 (16:21 +0200)]
Merge pull request #5067 from HanashiDev/formbuilder-missing-return-types

Add missing return types in FormBuilder

23 months agoAdd missing return types on formbuilder fields
Hanashi [Mon, 24 Oct 2022 14:15:17 +0000 (16:15 +0200)]
Add missing return types on formbuilder fields

23 months agoMerge pull request #5066 from HanashiDev/php-ddl-rework
Tim Düsterhus [Mon, 24 Oct 2022 13:32:49 +0000 (15:32 +0200)]
Merge pull request #5066 from HanashiDev/php-ddl-rework

Add proper types to PHP-DDL-API

23 months agoAdd return type `static` for `@return $this`
Hanashi [Mon, 24 Oct 2022 07:31:01 +0000 (09:31 +0200)]
Add return type `static` for `@return $this`

23 months agoMark protected as private in final classes
Hanashi [Sun, 23 Oct 2022 10:14:06 +0000 (12:14 +0200)]
Mark protected as private in final classes

23 months agoAdd proper types to DatabaseTable
Hanashi [Sat, 22 Oct 2022 09:28:07 +0000 (11:28 +0200)]
Add proper types to DatabaseTable

23 months agoAdd proper type `mixed` to DatabaseTableColumn
Hanashi [Sat, 22 Oct 2022 09:22:03 +0000 (11:22 +0200)]
Add proper type `mixed` to DatabaseTableColumn

23 months agoAdd proper types to *DatabaseTableColumns
Hanashi [Sat, 22 Oct 2022 08:51:00 +0000 (10:51 +0200)]
Add proper types to *DatabaseTableColumns

23 months agoMark `protected` as `private` in `DatabaseTableChangeProcessor`
Hanashi [Sun, 23 Oct 2022 10:25:27 +0000 (12:25 +0200)]
Mark `protected` as `private` in `DatabaseTableChangeProcessor`

23 months agoReplace empty function in DatabaseTable and DatabaseTableChangeProcessor
Hanashi [Sat, 22 Oct 2022 13:17:57 +0000 (15:17 +0200)]
Replace empty function in DatabaseTable and DatabaseTableChangeProcessor

23 months agoMerge branch '5.5'
Tim Düsterhus [Mon, 24 Oct 2022 08:05:42 +0000 (10:05 +0200)]
Merge branch '5.5'

23 months agoAdd proper types to properties in DatabaseTableChangeProcessor
Hanashi [Sat, 22 Oct 2022 09:33:09 +0000 (11:33 +0200)]
Add proper types to properties in DatabaseTableChangeProcessor

23 months agoAdd proper types to TDroppableDatabaseComponent
Hanashi [Sat, 22 Oct 2022 09:28:54 +0000 (11:28 +0200)]
Add proper types to TDroppableDatabaseComponent

23 months agoMark DatabaseTableForeignKey as `final`
Hanashi [Sat, 22 Oct 2022 08:59:32 +0000 (10:59 +0200)]
Mark DatabaseTableForeignKey as `final`

23 months agoMark *DatabaseTableColumn as `final`
Hanashi [Sat, 22 Oct 2022 07:53:21 +0000 (09:53 +0200)]
Mark *DatabaseTableColumn as `final`

23 months agoChange autoIncrement default type to false if autoIncrement is not set
Hanashi [Sat, 22 Oct 2022 15:29:25 +0000 (17:29 +0200)]
Change autoIncrement default type to false if autoIncrement is not set

23 months agoSynchronize the behavior of the dialog APIs on mobile
Alexander Ebert [Sun, 23 Oct 2022 12:21:59 +0000 (14:21 +0200)]
Synchronize the behavior of the dialog APIs on mobile

23 months agoImplicitly register the dialog web components
Alexander Ebert [Sat, 22 Oct 2022 12:46:35 +0000 (14:46 +0200)]
Implicitly register the dialog web components

23 months agoUpdate the JS artifacts
Alexander Ebert [Sat, 22 Oct 2022 12:32:38 +0000 (14:32 +0200)]
Update the JS artifacts

23 months agoMark the legacy dialog API as deprecated
Alexander Ebert [Sat, 22 Oct 2022 12:30:25 +0000 (14:30 +0200)]
Mark the legacy dialog API as deprecated

23 months agoAdd module level documentation to the dialog API
Alexander Ebert [Sat, 22 Oct 2022 12:29:00 +0000 (14:29 +0200)]
Add module level documentation to the dialog API

23 months agoMerge pull request #5065 from HanashiDev/fix/timedatabasetablecolumn
Alexander Ebert [Sat, 22 Oct 2022 12:01:22 +0000 (14:01 +0200)]
Merge pull request #5065 from HanashiDev/fix/timedatabasetablecolumn

Fix double implements in TimeDatabaseTableColumn

23 months agoFix double "implements" in TimeDatabaseTableColumn
Hanashi [Sat, 22 Oct 2022 07:38:47 +0000 (09:38 +0200)]
Fix double "implements" in TimeDatabaseTableColumn

23 months agoStop providing the superglobals and `$tpl.now` in templates
Tim Düsterhus [Fri, 21 Oct 2022 13:16:39 +0000 (15:16 +0200)]
Stop providing the superglobals and `$tpl.now` in templates

Templates have no business of accessing the super globals directly. This type
of business logic needs to happen in proper PHP code. This is especically true
with PSR-15 controllers which phase out the use of superglobals even for PHP.

The `$tpl.now` value is more easily accessed using the `TIME_NOW` constant.

23 months agoMerge pull request #5062 from WoltLab/time-modifier
Tim Düsterhus [Fri, 21 Oct 2022 13:15:43 +0000 (15:15 +0200)]
Merge pull request #5062 from WoltLab/time-modifier

Add support for `\DateTimeInterface` to (Date|Time|PlainTime)ModifierTemplatePlugin

23 months agoAdd support for `\DateTimeInterface` to (Date|Time|PlainTime)ModifierTemplatePlugin
Tim Düsterhus [Fri, 21 Oct 2022 10:45:48 +0000 (12:45 +0200)]
Add support for `\DateTimeInterface` to (Date|Time|PlainTime)ModifierTemplatePlugin

23 months agoClean up implementation of TimeModifierTemplatePlugin
Tim Düsterhus [Fri, 21 Oct 2022 10:42:13 +0000 (12:42 +0200)]
Clean up implementation of TimeModifierTemplatePlugin

No need to use the DateUtil here. `getDateTimeByTimestamp()` is trivial,
localization already happens via `IntlDateFormatter` and the `c` format is
meant for technical consumption, thus no need to run this via `DateUtil`’s
localization and TZ logic.

23 months agoRegister `UserLoginCancelLostPasswordListener` in the bootstrap script
Tim Düsterhus [Fri, 21 Oct 2022 10:34:27 +0000 (12:34 +0200)]
Register `UserLoginCancelLostPasswordListener` in the bootstrap script

23 months agoMove the registration of template's `$executeCronjobs` into the bootstrap
Tim Düsterhus [Thu, 20 Oct 2022 13:28:39 +0000 (15:28 +0200)]
Move the registration of template's `$executeCronjobs` into the bootstrap

The location within the bootstrap script is certainly not ideal either, but at
least it no longer takes up space in `WCF` and it also not requires a manual
method call in WCFACP.

23 months agoAdd bootstrapping script for com.woltlab.wcf
Tim Düsterhus [Wed, 19 Oct 2022 14:27:59 +0000 (16:27 +0200)]
Add bootstrapping script for com.woltlab.wcf

23 months agoRebuild bootstrapper in package installation / uninstallation
Tim Düsterhus [Wed, 19 Oct 2022 14:27:42 +0000 (16:27 +0200)]
Rebuild bootstrapper in package installation / uninstallation

23 months agoRun bootstrapping scripts at the end of WCF's boot
Tim Düsterhus [Wed, 19 Oct 2022 14:25:02 +0000 (16:25 +0200)]
Run bootstrapping scripts at the end of WCF's boot

23 months agoAdd RebuildBootstrapper command
Tim Düsterhus [Wed, 19 Oct 2022 14:24:31 +0000 (16:24 +0200)]
Add RebuildBootstrapper command

23 months agoAdd PackageList::getTopologicallySortedPackages()
Tim Düsterhus [Wed, 19 Oct 2022 11:58:15 +0000 (13:58 +0200)]
Add PackageList::getTopologicallySortedPackages()

23 months agoMerge pull request #5060 from WoltLab/register-listeners
Tim Düsterhus [Fri, 21 Oct 2022 09:23:50 +0000 (11:23 +0200)]
Merge pull request #5060 from WoltLab/register-listeners

Allow dynamic registration of PSR-14 style events

23 months agoMerge branch '5.5'
Tim Düsterhus [Fri, 21 Oct 2022 08:54:36 +0000 (10:54 +0200)]
Merge branch '5.5'

23 months agoAdd missing module comments to `.d.ts` files
Tim Düsterhus [Fri, 21 Oct 2022 08:52:42 +0000 (10:52 +0200)]
Add missing module comments to `.d.ts` files

23 months agoAllow dynamically registering event listeners
Tim Düsterhus [Thu, 20 Oct 2022 15:34:07 +0000 (17:34 +0200)]
Allow dynamically registering event listeners

23 months agoRemove useless checks in EventHandler
Tim Düsterhus [Thu, 20 Oct 2022 15:12:32 +0000 (17:12 +0200)]
Remove useless checks in EventHandler

23 months agoMake EventHandler::getListenerObject() independent of the EventListener DBO
Tim Düsterhus [Thu, 20 Oct 2022 15:06:11 +0000 (17:06 +0200)]
Make EventHandler::getListenerObject() independent of the EventListener DBO

23 months agoClean up dead code in EventHandler::loadActions()
Tim Düsterhus [Thu, 20 Oct 2022 15:03:57 +0000 (17:03 +0200)]
Clean up dead code in EventHandler::loadActions()

23 months agoChange protected to private in EventHandler
Tim Düsterhus [Thu, 20 Oct 2022 15:04:26 +0000 (17:04 +0200)]
Change protected to private in EventHandler

23 months agoAdd proper types to EventHandler
Tim Düsterhus [Thu, 20 Oct 2022 15:02:59 +0000 (17:02 +0200)]
Add proper types to EventHandler

23 months agoEagerly load installed event listeners in EventHandler
Tim Düsterhus [Thu, 20 Oct 2022 15:13:23 +0000 (17:13 +0200)]
Eagerly load installed event listeners in EventHandler

The only public API is fire() which needs the listeners loaded anyway.

23 months agoMark EventHandler as `final`
Tim Düsterhus [Thu, 20 Oct 2022 14:57:47 +0000 (16:57 +0200)]
Mark EventHandler as `final`

23 months agoMerge pull request #5059 from WoltLab/xsrf-token-middleware
Tim Düsterhus [Thu, 20 Oct 2022 13:49:32 +0000 (15:49 +0200)]
Merge pull request #5059 from WoltLab/xsrf-token-middleware

Add `Xsrf` middleware

23 months agoRevert "Call `initSecurityToken()` where previously `defineConstants()` was called"
Tim Düsterhus [Thu, 20 Oct 2022 13:44:07 +0000 (15:44 +0200)]
Revert "Call `initSecurityToken()` where previously `defineConstants()` was called"

This is no longer requires, because the `Xsrf` middleware will now retreive the
security token and thus implicitly set the cookie.

This reverts commit 87021f88c22cf19863e89bd3bd30c9f5b0420568.

23 months agoAdd `Xsrf` middleware
Tim Düsterhus [Thu, 20 Oct 2022 13:43:30 +0000 (15:43 +0200)]
Add `Xsrf` middleware

23 months agoAdd `cuyz/valinor` composer dependency
Tim Düsterhus [Wed, 19 Oct 2022 15:08:48 +0000 (17:08 +0200)]
Add `cuyz/valinor` composer dependency

23 months agoMerge pull request #5048 from WoltLab/intl
Alexander Ebert [Thu, 20 Oct 2022 12:53:49 +0000 (14:53 +0200)]
Merge pull request #5048 from WoltLab/intl

Use the Intl extension for locale dependent components

23 months agoMerge pull request #5058 from WoltLab/cli-wcf-cleanup
Tim Düsterhus [Thu, 20 Oct 2022 11:45:18 +0000 (13:45 +0200)]
Merge pull request #5058 from WoltLab/cli-wcf-cleanup

Clean up CLIWCF

23 months agoRemove the long help flag from cli.php
Tim Düsterhus [Thu, 20 Oct 2022 11:05:55 +0000 (13:05 +0200)]
Remove the long help flag from cli.php

Since the previous commit the number of possible flags is known a-priori and
only the `exitOnFail` flag even has a long-form help text and that one even
isn't useful at all.

23 months agoRemove the events in CLIWCF::initArgv()
Tim Düsterhus [Thu, 20 Oct 2022 11:03:14 +0000 (13:03 +0200)]
Remove the events in CLIWCF::initArgv()

I don't see how these events can be meaningfully used for anything this early
in the application startup.

23 months agoRemove the `--language` option from cli.php
Tim Düsterhus [Thu, 20 Oct 2022 10:59:27 +0000 (12:59 +0200)]
Remove the `--language` option from cli.php

After login the language of the user in question is used and it seems to be a
reasonable assumption that the administrator is capable of understanding the
community's default language.

23 months agoRemove the persisting of the CLI history in the database
Tim Düsterhus [Thu, 20 Oct 2022 10:52:52 +0000 (12:52 +0200)]
Remove the persisting of the CLI history in the database

Also not really useful: The number of possible commands are very limited and
users will just look them up in the manual anyway if they need them.

23 months agoRemove CLIWCF::checkForUpdates()
Tim Düsterhus [Thu, 20 Oct 2022 10:38:12 +0000 (12:38 +0200)]
Remove CLIWCF::checkForUpdates()

This feature is not really useful. It's not usable programmatically due to the
need for login and it's also not helpful for the administrator, as the notice
in frontend and ACP are much more prominent.

23 months agoMerge branch '5.5'
Tim Düsterhus [Thu, 20 Oct 2022 09:38:55 +0000 (11:38 +0200)]
Merge branch '5.5'

23 months agoMerge pull request #5057 from WoltLab/smtp-email-fails-to-stringify
Tim Düsterhus [Wed, 19 Oct 2022 15:01:48 +0000 (17:01 +0200)]
Merge pull request #5057 from WoltLab/smtp-email-fails-to-stringify

Improve the behavior of the SmtpEmailTransport if generating the DATA value fails

23 months agoImprove the behavior of the SmtpEmailTransport if generating the DATA value fails
Tim Düsterhus [Wed, 19 Oct 2022 14:50:02 +0000 (16:50 +0200)]
Improve the behavior of the SmtpEmailTransport if generating the DATA value fails

23 months agoFix `@package` annotation in ClearCache command
Tim Düsterhus [Wed, 19 Oct 2022 11:58:40 +0000 (13:58 +0200)]
Fix `@package` annotation in ClearCache command

23 months agoMerge pull request #5055 from WoltLab/session-keep-alive-variable
Tim Düsterhus [Wed, 19 Oct 2022 11:31:46 +0000 (13:31 +0200)]
Merge pull request #5055 from WoltLab/session-keep-alive-variable

Remove the deprecated `__sessionKeepAlive` template variable

23 months agoMerge pull request #4761 from IceQ1337/patch02
Alexander Ebert [Wed, 19 Oct 2022 11:18:43 +0000 (13:18 +0200)]
Merge pull request #4761 from IceQ1337/patch02

Add and update several web spiders

23 months agoRemove the deprecated `__sessionKeepAlive` template variable
Tim Düsterhus [Wed, 19 Oct 2022 10:06:11 +0000 (12:06 +0200)]
Remove the deprecated `__sessionKeepAlive` template variable

It does not really belong in this location.

see 96bd897793928400a889a19de0f6878901a89d64

23 months agoFix wrong closing tag
Marcel Werk [Tue, 18 Oct 2022 16:00:00 +0000 (18:00 +0200)]
Fix wrong closing tag

23 months agoMerge pull request #5053 from WoltLab/request-nonce
Tim Düsterhus [Tue, 18 Oct 2022 15:26:22 +0000 (17:26 +0200)]
Merge pull request #5053 from WoltLab/request-nonce

Harden the JavaScript relocator with per-request nonces

23 months agoAdd missing backslash in front of constant in WCF
Tim Düsterhus [Tue, 18 Oct 2022 15:20:53 +0000 (17:20 +0200)]
Add missing backslash in front of constant in WCF

Co-authored-by: Alexander Ebert <ebert@woltlab.com>
23 months agoRelease 5.5.6 5.5.6
Alexander Ebert [Tue, 18 Oct 2022 14:50:50 +0000 (16:50 +0200)]
Release 5.5.6

23 months agoUse per-request nonce for JavaScript relocator
Tim Düsterhus [Tue, 18 Oct 2022 14:50:46 +0000 (16:50 +0200)]
Use per-request nonce for JavaScript relocator

see def6dc32f5cf91ca3fc58fd6617fbc16765f4277

23 months agoAdd WCF::getRequestNonce()
Tim Düsterhus [Tue, 18 Oct 2022 14:50:26 +0000 (16:50 +0200)]
Add WCF::getRequestNonce()

23 months agoMerge branch '5.4' into 5.5
Alexander Ebert [Tue, 18 Oct 2022 14:47:06 +0000 (16:47 +0200)]
Merge branch '5.4' into 5.5

23 months agoRelease 5.4.24 5.4.24
Alexander Ebert [Tue, 18 Oct 2022 14:44:19 +0000 (16:44 +0200)]
Release 5.4.24

23 months agoMerge branch '5.3' into 5.4
Alexander Ebert [Tue, 18 Oct 2022 14:43:34 +0000 (16:43 +0200)]
Merge branch '5.3' into 5.4

23 months agoRelease 5.3.25 5.3.25
Alexander Ebert [Tue, 18 Oct 2022 14:38:23 +0000 (16:38 +0200)]
Release 5.3.25

23 months agoMerge branch '5.5'
Tim Düsterhus [Tue, 18 Oct 2022 14:34:12 +0000 (16:34 +0200)]
Merge branch '5.5'

23 months agoMerge branch '5.4' into 5.5
Tim Düsterhus [Tue, 18 Oct 2022 14:28:22 +0000 (16:28 +0200)]
Merge branch '5.4' into 5.5

23 months agoMerge branch '5.3' into 5.4
Tim Düsterhus [Tue, 18 Oct 2022 14:28:10 +0000 (16:28 +0200)]
Merge branch '5.3' into 5.4

23 months agoMerge branch 'js-relocate-xss' into 5.3
Tim Düsterhus [Tue, 18 Oct 2022 14:25:39 +0000 (16:25 +0200)]
Merge branch 'js-relocate-xss' into 5.3

23 months agoApply numeric formatting in wcf.acp.devtools.sync.status.success
Tim Düsterhus [Tue, 18 Oct 2022 14:10:46 +0000 (16:10 +0200)]
Apply numeric formatting in wcf.acp.devtools.sync.status.success

23 months agoAdd the module comment to `<woltlab-core-date-time>`
Alexander Ebert [Tue, 18 Oct 2022 12:29:39 +0000 (14:29 +0200)]
Add the module comment to `<woltlab-core-date-time>`

23 months agoRemove the legacy module for the relative time element
Alexander Ebert [Tue, 18 Oct 2022 12:26:21 +0000 (14:26 +0200)]
Remove the legacy module for the relative time element

23 months agoUpdate the `dateTime` property of the `<time>` element when updating the date or...
Alexander Ebert [Tue, 18 Oct 2022 12:20:26 +0000 (14:20 +0200)]
Update the `dateTime` property of the `<time>` element when updating the date or title

23 months agoUse the reported time zone from the server for date calculations
Alexander Ebert [Tue, 18 Oct 2022 12:13:21 +0000 (14:13 +0200)]
Use the reported time zone from the server for date calculations

23 months agoRename `<woltlab-core-time>` → `<woltlab-core-date-time>`
Alexander Ebert [Tue, 18 Oct 2022 12:01:35 +0000 (14:01 +0200)]
Rename `<woltlab-core-time>` → `<woltlab-core-date-time>`

23 months agoMerge pull request #5051 from WoltLab/require-intl
Tim Düsterhus [Tue, 18 Oct 2022 08:10:33 +0000 (10:10 +0200)]
Merge pull request #5051 from WoltLab/require-intl

Add a requirement on PHP's `intl` extension

23 months agoRemove obsolete `symfony/polyfill-intl-idn` composer dependency
Tim Düsterhus [Mon, 17 Oct 2022 14:22:10 +0000 (16:22 +0200)]
Remove obsolete `symfony/polyfill-intl-idn` composer dependency

23 months agoRemove fallback code for non-installed `intl` from FileReader
Tim Düsterhus [Mon, 17 Oct 2022 14:18:06 +0000 (16:18 +0200)]
Remove fallback code for non-installed `intl` from FileReader