Tim Düsterhus [Tue, 15 Nov 2022 13:40:17 +0000 (14:40 +0100)]
Merge pull request #5125 from WoltLab/package-archive-cleanup
Further clean up the package system
Tim Düsterhus [Tue, 15 Nov 2022 10:13:32 +0000 (11:13 +0100)]
Remove PackageArchive::getAllExistingRequirements()
The last remaining user of this method was removed in the previous commit. The
logic of this method was overly complex:
- It handled the possibility that a single package is installed multiple times,
which is not possible since forever.
- It contained special (and semi-broken) logic for requirement links that are
already stored in the database. Since
a93b160e72731d72e58a13052c1b6b83b089552a
all requirements in the database were deleted before this method was called
in PackageInstallationDispatcher. It also failed to account for a requirement
link existing, but the target package being of an insufficient version.
Tim Düsterhus [Tue, 15 Nov 2022 10:11:47 +0000 (11:11 +0100)]
Stop using PackageArchive::getAllExistingRequirements()
The method is overly complex and will be removed in a follow-up commit.
Tim Düsterhus [Tue, 15 Nov 2022 10:07:26 +0000 (11:07 +0100)]
Further streamline the logic in PackageArchive::getExistingRequirements()
Tim Düsterhus [Tue, 15 Nov 2022 10:05:38 +0000 (11:05 +0100)]
Remove obsolete handling of duplicated packages in PackageArchive::getExistingRequirements()
`package` is a UNIQUE KEY in the database, the deleted logic was dead code.
Tim Düsterhus [Tue, 15 Nov 2022 09:26:13 +0000 (10:26 +0100)]
Add proper types to Package::checkFromversion()
Tim Düsterhus [Tue, 15 Nov 2022 09:20:26 +0000 (10:20 +0100)]
Remove PackageArchive::isValidInstall()
This method is unused, instead the existing logic checks if
`->getInstallInstructions()` is (non-)empty.
Tim Düsterhus [Tue, 15 Nov 2022 09:38:49 +0000 (10:38 +0100)]
Do not attempt to sanitize the path to `[internal function]`
This looks ugly and leaks some information: How deep WoltLab Suite Core is
location within the file system hierarchy.
Alexander Ebert [Mon, 14 Nov 2022 17:17:37 +0000 (18:17 +0100)]
Merge pull request #5123 from WoltLab/background-queue-http-header
Migrate the forced check of the background queue to a HTTP response header
Alexander Ebert [Mon, 14 Nov 2022 16:35:25 +0000 (17:35 +0100)]
Reorder the conditions to make it easier to understand
Co-authored-by: Tim Düsterhus <duesterhus@woltlab.com>
Alexander Ebert [Mon, 14 Nov 2022 15:48:13 +0000 (16:48 +0100)]
Move the HTTP header name into a common class
Alexander Ebert [Mon, 14 Nov 2022 15:45:40 +0000 (16:45 +0100)]
Move the HTTP header for legacy requests into the `AJAXProxyAction`
Alexander Ebert [Mon, 14 Nov 2022 15:42:08 +0000 (16:42 +0100)]
Move the PhpDoc comment to the public API
Alexander Ebert [Mon, 14 Nov 2022 15:41:15 +0000 (16:41 +0100)]
Use `isACPRequest()` instead of probing for the `WCFACP` class
Alexander Ebert [Mon, 14 Nov 2022 15:15:55 +0000 (16:15 +0100)]
Stop injecting `forceBackgroundQueuePerform` into AJAX responses
Alexander Ebert [Mon, 14 Nov 2022 15:13:51 +0000 (16:13 +0100)]
Skip the background queue check for backend requests
Alexander Ebert [Mon, 14 Nov 2022 15:12:31 +0000 (16:12 +0100)]
Check the background queue when the response header is present
Alexander Ebert [Mon, 14 Nov 2022 15:06:56 +0000 (16:06 +0100)]
Conditionally add `woltlab-background-queue-check: yes` to the response
This header is intended to signal the client that an async check for pending jobs in the background queue should be dispatched.
Alexander Ebert [Mon, 14 Nov 2022 14:26:03 +0000 (15:26 +0100)]
Fix the creation of DOM elements from a HTML string
The naive approach of using `innerHTML` does not work for script tags. These are only recognized when they are manually inserted into the DOM for security reasons.
Tim Düsterhus [Mon, 14 Nov 2022 14:17:49 +0000 (15:17 +0100)]
Merge pull request #5122 from WoltLab/json-request-body
Add JsonBody middleware
Tim Düsterhus [Mon, 14 Nov 2022 14:17:39 +0000 (15:17 +0100)]
Merge pull request #5121 from WoltLab/formbuilder-id-escape
Properly escape special characters in form builder IDs
Tim Düsterhus [Mon, 14 Nov 2022 13:43:44 +0000 (14:43 +0100)]
Properly escape special characters in form builder IDs
Tim Düsterhus [Fri, 4 Nov 2022 09:00:12 +0000 (10:00 +0100)]
Improve content-type check in JsonBody middleware
Alexander Ebert [Thu, 3 Nov 2022 16:56:50 +0000 (17:56 +0100)]
Transparently decode JSON requests
Tim Düsterhus [Mon, 14 Nov 2022 13:41:22 +0000 (14:41 +0100)]
Add __valueIntervalFormFieldDependency.tpl to syncTemplates.json
Alexander Ebert [Mon, 14 Nov 2022 12:04:45 +0000 (13:04 +0100)]
Add npm script to refresh the web component bundle
Alexander Ebert [Mon, 14 Nov 2022 12:01:49 +0000 (13:01 +0100)]
Merge pull request #5117 from WoltLab/js-preload
Preload phrases for use in TypeScript
Alexander Ebert [Mon, 14 Nov 2022 11:53:45 +0000 (12:53 +0100)]
Replace `@\unlink()` with a check for file existence
Alexander Ebert [Mon, 14 Nov 2022 11:52:30 +0000 (12:52 +0100)]
Use the `AtomicWriter` to create the phrase cache
Alexander Ebert [Mon, 14 Nov 2022 11:50:01 +0000 (12:50 +0100)]
Fix the logic of the check for the phrase preload rebuild
Tim Düsterhus [Mon, 14 Nov 2022 10:14:22 +0000 (11:14 +0100)]
Rebuild compiled JavaScript
Tim Düsterhus [Mon, 14 Nov 2022 09:41:39 +0000 (10:41 +0100)]
Fix bad merge in EnforceAcpAuthentication middleware
The exception should no longer be there.
see
a693ef9dc6ab80b8c3c4671923071e4b9f9b23f3
see
2115b6456f75068740d54db29d4b5970a4bb7f36
Tim Düsterhus [Mon, 14 Nov 2022 09:41:16 +0000 (10:41 +0100)]
Merge branch '5.5'
Tim Düsterhus [Mon, 14 Nov 2022 09:37:02 +0000 (10:37 +0100)]
Tim Düsterhus [Mon, 14 Nov 2022 09:22:05 +0000 (10:22 +0100)]
Update composer dependencies
Tim Düsterhus [Mon, 14 Nov 2022 08:08:12 +0000 (09:08 +0100)]
Merge pull request #5120 from WoltLab/package-fix-update
Clean up package archive handling
Alexander Ebert [Sun, 13 Nov 2022 16:15:04 +0000 (17:15 +0100)]
`getSearchFormElement()` expects a string for the value parameter
Alexander Ebert [Sun, 13 Nov 2022 16:14:24 +0000 (17:14 +0100)]
Validate that the searched option implements the required interface
Alexander Ebert [Sun, 13 Nov 2022 15:43:36 +0000 (16:43 +0100)]
Remove selection markers after discarding the link dialog
See https://www.woltlab.com/community/thread/297178-links-bearbeiten-und-kopieren/
Alexander Ebert [Sun, 13 Nov 2022 15:09:23 +0000 (16:09 +0100)]
Bind the event listeners for the RSS feed dialog everytime
The dialog is replaced with the provided HTML on every invocation. Since this is a named dialog, the instance is set up once, but rebuild with every invocation.
See https://www.woltlab.com/community/thread/297896-kopieren-schaltfl%C3%A4che-nach-erneutem-%C3%B6ffnen-des-dialogs-nicht-mehr-funktionsf%C3%A4hig/
Alexander Ebert [Sun, 13 Nov 2022 14:53:58 +0000 (15:53 +0100)]
Fix the scroll offset when the first message is being targeted
See https://www.woltlab.com/community/thread/297814-mobil-zus%C3%A4tzlicher-container-sichtbar-bei-direktlink-auf-den-ersten-beitrag-eine/
Alexander Ebert [Sat, 12 Nov 2022 14:00:25 +0000 (15:00 +0100)]
Preload common phrases
Alexander Ebert [Sat, 12 Nov 2022 13:17:25 +0000 (14:17 +0100)]
Move the registration of preload phrases into a dedicated event listener
Alexander Ebert [Sat, 12 Nov 2022 11:53:15 +0000 (12:53 +0100)]
Provide only the plugin name when syncing pips
The full object provides little details because it is created on-the-fly with as little information as required.
Alexander Ebert [Sat, 12 Nov 2022 11:51:20 +0000 (12:51 +0100)]
Reset the phrase preload cache when syncing files and languages
Alexander Ebert [Sat, 12 Nov 2022 11:18:01 +0000 (12:18 +0100)]
Preload the phrase for relative timestamps
Alexander Ebert [Sat, 12 Nov 2022 11:11:37 +0000 (12:11 +0100)]
Fix the namespace and file name of the collecting event
Alexander Ebert [Sat, 12 Nov 2022 11:09:55 +0000 (12:09 +0100)]
Fix the condition to rebuild the phrase cache
Alexander Ebert [Sat, 12 Nov 2022 11:06:50 +0000 (12:06 +0100)]
Create the directory used for JS phrase preloads
Alexander Ebert [Fri, 11 Nov 2022 17:33:38 +0000 (18:33 +0100)]
Simplify the events by using constructor property promotion
Alexander Ebert [Fri, 11 Nov 2022 17:30:42 +0000 (18:30 +0100)]
Invert the order of the phrase preloader and the web component bundle
Alexander Ebert [Fri, 11 Nov 2022 17:30:25 +0000 (18:30 +0100)]
Replace the usage of `\gmdate()`
Alexander Ebert [Thu, 10 Nov 2022 17:10:13 +0000 (18:10 +0100)]
Add explicit markers to the preload cache files
Alexander Ebert [Thu, 10 Nov 2022 16:57:51 +0000 (17:57 +0100)]
Remove the previous service implementation
For some reason the `git mv` did not properly work.
Alexander Ebert [Thu, 10 Nov 2022 16:57:17 +0000 (17:57 +0100)]
Add the cache buster to the generated JS artifacts
Alexander Ebert [Thu, 10 Nov 2022 16:46:33 +0000 (17:46 +0100)]
Move the URL generation for the phrase preloader into the template
Alexander Ebert [Thu, 10 Nov 2022 16:42:26 +0000 (17:42 +0100)]
Move the URL handling of the phrase preloader into the bootstrap script
Alexander Ebert [Thu, 10 Nov 2022 16:38:34 +0000 (17:38 +0100)]
Restrict preload phrases to static exports only
Evaluating template scripting on runtime inside JavaScript is still possible, but not server-side replacements will be made.
Alexander Ebert [Thu, 10 Nov 2022 15:38:08 +0000 (16:38 +0100)]
Add a reference to the phrase preload cache
Alexander Ebert [Thu, 10 Nov 2022 15:36:33 +0000 (16:36 +0100)]
Add `PhrasePreloadCache` to retrieve and implicitly create the preload cache
Alexander Ebert [Thu, 10 Nov 2022 15:32:11 +0000 (16:32 +0100)]
Create the preload cache for phrases
Alexander Ebert [Thu, 10 Nov 2022 15:13:32 +0000 (16:13 +0100)]
Rename `RebuildPreloadPhrases` to `CachePreloadPhrases`
Alexander Ebert [Thu, 10 Nov 2022 15:09:56 +0000 (16:09 +0100)]
Reset the preload cache when a language has been imported
Alexander Ebert [Thu, 10 Nov 2022 15:00:35 +0000 (16:00 +0100)]
Reset the preload cache if a cached phrase was modified
Alexander Ebert [Thu, 10 Nov 2022 13:36:39 +0000 (14:36 +0100)]
Request the rebuild of the preload cache after changes to the package list
Alexander Ebert [Wed, 9 Nov 2022 15:50:42 +0000 (16:50 +0100)]
Add a PoC for a static phrase preloader
Alexander Ebert [Sat, 12 Nov 2022 11:29:39 +0000 (12:29 +0100)]
Add the `PackageInstallationSynced` event
Alexander Ebert [Thu, 10 Nov 2022 15:09:43 +0000 (16:09 +0100)]
Add the `LanguageImported` event
Alexander Ebert [Thu, 10 Nov 2022 13:49:42 +0000 (14:49 +0100)]
Add the `PhraseChanged` event
Alexander Ebert [Thu, 10 Nov 2022 13:08:30 +0000 (14:08 +0100)]
Add the `PackageListChanged` event
Alexander Ebert [Fri, 11 Nov 2022 15:49:33 +0000 (16:49 +0100)]
Merge pull request #5119 from WoltLab/acp-not-authorized-ux
Improve user experience when accessing the ACP with an unauthorized user
Marcel Werk [Fri, 11 Nov 2022 15:24:31 +0000 (16:24 +0100)]
Typo
Alexander Ebert [Fri, 11 Nov 2022 14:41:45 +0000 (15:41 +0100)]
Prevent wrapping of text on narrow resolutions
There is plenty of whitespace around each column to allow for some small overlaps.
https://www.woltlab.com/community/thread/297666-blog-unsch%C3%B6ne-darstellung-der-reaktionen/
Marcel Werk [Fri, 11 Nov 2022 13:53:19 +0000 (14:53 +0100)]
Merge pull request #5118 from WoltLab/remove-legacy-cookie-banner
Remove legacy cookie banner
Tim Düsterhus [Fri, 11 Nov 2022 09:28:08 +0000 (10:28 +0100)]
Remove PackageArchive::setPackage()
This method was unused outside of PackageArchive. Removing this setter, removes
one avenue where state can be modified.
Tim Düsterhus [Fri, 11 Nov 2022 09:20:31 +0000 (10:20 +0100)]
Replace some `empty()` checks in PackageValidationArchive
Tim Düsterhus [Fri, 11 Nov 2022 09:18:44 +0000 (10:18 +0100)]
Use `->prepare()` in PackageValidationArchive
Tim Düsterhus [Fri, 11 Nov 2022 09:06:35 +0000 (10:06 +0100)]
Use `->prepare()` in PackageArchive
Tim Düsterhus [Fri, 11 Nov 2022 09:05:00 +0000 (10:05 +0100)]
Add some return types to PackageArchive
Tim Düsterhus [Fri, 11 Nov 2022 09:01:18 +0000 (10:01 +0100)]
Remove PackageArchive::getInstructions()
This is redundant with `getUpdateInstructions()` and `getInstallInstructions()`
and unused. Remove it to keep the API simple.
Alexander Ebert [Thu, 10 Nov 2022 16:50:44 +0000 (17:50 +0100)]
Merge pull request #5107 from WoltLab/js-lang-early
Make JavaScript Language module available early
Tim Düsterhus [Thu, 10 Nov 2022 15:40:48 +0000 (16:40 +0100)]
Fix code style in \wcf\system\WCF
Tim Düsterhus [Thu, 10 Nov 2022 14:00:18 +0000 (15:00 +0100)]
Improve user experience when accessing the ACP with an unauthorized user
Specifically the logout link is available now.
Marcel Werk [Thu, 10 Nov 2022 12:11:14 +0000 (13:11 +0100)]
Remove legacy cookie banner
From a legal point of view, this type of cookie banner is useless.
Tim Düsterhus [Thu, 10 Nov 2022 11:49:57 +0000 (12:49 +0100)]
Update composer dependencies
Alexander Ebert [Wed, 9 Nov 2022 15:03:37 +0000 (16:03 +0100)]
Add `getPhrase()` and `registerPhrase()` to the `Language` module
This makes it much easier to auto-import the helper functions in modules. The old names were too unspecific and made it pretty much impossible to properly import them.
The `addObject()` has always been a lazy function with a severe performance penalty. The soon-to-be-introduced `{jsphrase}` helper makes it much easier to work with it.
Alexander Ebert [Wed, 9 Nov 2022 14:56:08 +0000 (15:56 +0100)]
Rename the phrase functions to `getPhrase()` and `registerPhrase`
Marcel Werk [Wed, 9 Nov 2022 11:57:53 +0000 (12:57 +0100)]
Add 4k support for avatar images (#5114)
Add 4k support for avatar images
Marcel Werk [Tue, 8 Nov 2022 15:14:49 +0000 (16:14 +0100)]
Merge pull request #5116 from WoltLab/automatic-template-diff
Add automatic template diff
Marcel Werk [Tue, 8 Nov 2022 14:56:44 +0000 (15:56 +0100)]
Add automatic template diff
Automatically compare with default template if it is the only option.
Marcel Werk [Tue, 8 Nov 2022 14:25:30 +0000 (15:25 +0100)]
Fix missing consideration of the ad position when calculating the show order
Tim Düsterhus [Tue, 8 Nov 2022 13:41:08 +0000 (14:41 +0100)]
Update cuyz/valinor composer dependency
Tim Düsterhus [Tue, 8 Nov 2022 13:36:45 +0000 (14:36 +0100)]
Update pelago/emogrifier composer dependency
Alexander Ebert [Mon, 7 Nov 2022 17:01:03 +0000 (18:01 +0100)]
Convert the typing for `WoltLabTemplate` into a plain interface
Tim Düsterhus [Mon, 7 Nov 2022 16:55:57 +0000 (17:55 +0100)]
Remove workaround for WoltLabSuite/Core/Template
Tim Düsterhus [Mon, 7 Nov 2022 16:23:53 +0000 (17:23 +0100)]
Remove broken `_token_stack:` label from Jison output
see zaach/jison#285
Marcel Werk [Mon, 7 Nov 2022 16:25:07 +0000 (17:25 +0100)]
Remove deprecated avatar / thumbnail sizes
Alexander Ebert [Mon, 7 Nov 2022 15:59:44 +0000 (16:59 +0100)]
Fix misuse of the exception parameter
Tim Düsterhus [Mon, 7 Nov 2022 14:51:30 +0000 (15:51 +0100)]
Make Language available to WebComponents
Tim Düsterhus [Mon, 7 Nov 2022 14:38:33 +0000 (15:38 +0100)]
Make Template available to WebComponents