Tim Düsterhus [Mon, 7 Mar 2022 15:53:09 +0000 (16:53 +0100)]
Merge branch '5.4'
Joshua Rüsweg [Mon, 7 Mar 2022 15:39:10 +0000 (16:39 +0100)]
Merge pull request #4693 from WoltLab/5.5-upload-form-field-image-preview
Add preview image for image upload component
joshuaruesweg [Mon, 7 Mar 2022 14:35:35 +0000 (15:35 +0100)]
Use `width` and `height` attributes for image previews
joshuaruesweg [Mon, 7 Mar 2022 10:47:01 +0000 (11:47 +0100)]
Add preview image for image upload component
Previously, no thumbnails were displayed during the upload process if it was possible to upload multiple images. This change adds this functionality and displays the images together with the ImageViewer.
Tim Düsterhus [Mon, 7 Mar 2022 09:37:35 +0000 (10:37 +0100)]
Fix PHP 8.1 compatibility in SignatureCache
> Message: preg_replace_callback(): Passing null to parameter #3 ($subject) of
> type array|string is deprecated
Tim Düsterhus [Mon, 7 Mar 2022 08:38:52 +0000 (09:38 +0100)]
Update composer dependencies
Tim Düsterhus [Fri, 4 Mar 2022 13:26:33 +0000 (14:26 +0100)]
Merge branch '5.4'
Tim Düsterhus [Fri, 4 Mar 2022 13:25:31 +0000 (14:25 +0100)]
Add proper return types to SessionHandler::(get|check)SecurityToken()
Marcel Werk [Fri, 4 Mar 2022 13:25:31 +0000 (14:25 +0100)]
Merge pull request #4691 from WoltLab/search-xsrf
Remove `{csrfToken}` from pageHeaderSearch
Alexander Ebert [Fri, 4 Mar 2022 13:21:52 +0000 (14:21 +0100)]
Fixed a small typo
Alexander Ebert [Fri, 4 Mar 2022 13:11:05 +0000 (14:11 +0100)]
Set the jQuery UI version to `1.99.99`
Tim Düsterhus [Fri, 4 Mar 2022 12:54:22 +0000 (13:54 +0100)]
Merge pull request #4692 from WoltLab/import-mapping-reset
Move the reset of the import mapping into a dedicated JavaScript module
Tim Düsterhus [Fri, 4 Mar 2022 11:18:52 +0000 (12:18 +0100)]
Move the reset of the import mapping into a dedicated JavaScript module
This removes a non-trivial amount of JavaScript and specifically:
- Fixes the use of the legacy `index.php/AJAXInvoke` syntax.
- Avoids the use of the deprecated SECURITY_TOKEN pseudo-constant.
Tim Düsterhus [Fri, 4 Mar 2022 10:49:50 +0000 (11:49 +0100)]
Remove `{csrfToken}` from pageHeaderSearch
The submission of the form is intercepted by WoltLabSuite/Core/Ui/Search/Page
and then converted into a GET redirect that does not contain the `t` parameter,
making it useless.
Alexander Ebert [Thu, 3 Mar 2022 18:38:04 +0000 (19:38 +0100)]
Restoring the selection immediately discarded it
See https://www.woltlab.com/community/thread/294654-links-werden-vom-editor-aus-dem-text-direkt-nach-ganz-oben-verschoben/
mutec [Mon, 8 Nov 2021 16:12:29 +0000 (17:12 +0100)]
Add support for `IStorableObject::getUploadFiles()` in `UploadFormField`
Add support for `IStorableObject::get{$propertyName}UploadFiles()` which is supposed to return an array of `UploadFile`s.
Using explicitly set `UploadFile` objects makes it possible to define a filename and an image link differing from the real path the uploaded file is stored at.
Closes #4582
Tim Düsterhus [Thu, 3 Mar 2022 13:35:31 +0000 (14:35 +0100)]
Fix formatting in Email
Unfortunately the heredoc syntax is a bit wonky, thus requiring that lone
comma.
Tim Düsterhus [Thu, 3 Mar 2022 13:32:42 +0000 (14:32 +0100)]
Dump the headers of all body parts in Email::debugDump()
Tim Düsterhus [Thu, 3 Mar 2022 13:20:54 +0000 (14:20 +0100)]
Dump the email once for each recipient in Email::debugDump()
Tim Düsterhus [Thu, 3 Mar 2022 13:10:29 +0000 (14:10 +0100)]
Fix HTML encoding in Email::debugDump()
Tim Düsterhus [Thu, 3 Mar 2022 13:09:28 +0000 (14:09 +0100)]
Fix detection of HTML mime parts in Email::debugDump()
joshuaruesweg [Thu, 3 Mar 2022 13:00:12 +0000 (14:00 +0100)]
Merge branch '5.4'
joshuaruesweg [Thu, 3 Mar 2022 12:59:02 +0000 (13:59 +0100)]
Merge branch '5.3'
Alexander Ebert [Thu, 3 Mar 2022 12:56:48 +0000 (13:56 +0100)]
Force-bump the jQuery Ui version
joshuaruesweg [Thu, 3 Mar 2022 12:56:27 +0000 (13:56 +0100)]
Fix detection of ipv4 adresses for stopforumspam integration
Tim Düsterhus [Thu, 3 Mar 2022 11:42:01 +0000 (12:42 +0100)]
Merge branch '5.4'
joshuaruesweg [Thu, 3 Mar 2022 08:05:44 +0000 (09:05 +0100)]
Surpress output of empty labeled url user option fields
Tim Düsterhus [Wed, 2 Mar 2022 16:20:27 +0000 (17:20 +0100)]
Merge pull request #4687 from WoltLab/cache-name
Make CacheHandler::getCacheName() less expensive
Tim Düsterhus [Wed, 2 Mar 2022 16:09:03 +0000 (17:09 +0100)]
Version the DiskCacheSource filename
see #4685
Tim Düsterhus [Wed, 2 Mar 2022 15:24:59 +0000 (16:24 +0100)]
Make CacheHandler::getCacheName() less expensive
The old implementation generated cache filenames that are a little cleaner to
the human eye, but the generation was needlessly expensive, even calling the
UTF-8-safe StringUtil::firstCharToUpperCase() on an ASCII value.
It will need to be checked if the changing cache name will cause issues during
the upgrade to 5.5, as it will implicitly result in a cache clear.
Tim Düsterhus [Wed, 2 Mar 2022 15:16:25 +0000 (16:16 +0100)]
Merge pull request #4686 from WoltLab/cleanup
Assorted cleanup
Tim Düsterhus [Wed, 2 Mar 2022 15:07:31 +0000 (16:07 +0100)]
Remove obsolete wcfPackageListURL property from WCF.ACP.Package.Uninstallation
Tim Düsterhus [Wed, 2 Mar 2022 15:00:04 +0000 (16:00 +0100)]
Remove dead code in packageList.tpl
`jsPluginContainer` does not appear anywhere else in the codebase.
Tim Düsterhus [Wed, 2 Mar 2022 14:58:43 +0000 (15:58 +0100)]
Remove `packageID` parameter from PackageListPage
It's no longer used since the previous commit, badly named and also a security
issue, because it might be used with a XSRF attack.
Tim Düsterhus [Wed, 2 Mar 2022 14:56:44 +0000 (15:56 +0100)]
Remove PACKAGE_ID check for WCF.ACP.Package.Uninstallation
The PACKAGE_ID will always be `1` when accessing these pages since a long time.
Tim Düsterhus [Wed, 2 Mar 2022 14:53:36 +0000 (15:53 +0100)]
Remove use of deprecated `forceWCF` parameter to LinkHandler::getLink()
Tim Düsterhus [Wed, 2 Mar 2022 14:41:06 +0000 (15:41 +0100)]
Add leading backslashes to function calls in generated options.inc.php
Tim Düsterhus [Wed, 2 Mar 2022 14:32:27 +0000 (15:32 +0100)]
Correctly handle an empty spiderlist
see
96dced2d6197d64f30b6638f3966a8778c586cd6
Tim Düsterhus [Wed, 2 Mar 2022 13:15:53 +0000 (14:15 +0100)]
Tim Düsterhus [Wed, 2 Mar 2022 12:55:45 +0000 (13:55 +0100)]
Allow `fromversion="*"` in dev tools
Resolves #4659
Alexander Ebert [Wed, 2 Mar 2022 10:33:47 +0000 (11:33 +0100)]
User menu in the style editor was out of sync
Tim Düsterhus [Wed, 2 Mar 2022 10:27:34 +0000 (11:27 +0100)]
Ensure WoltLab Suite's autoloader runs first
While we already configured composer's autoloader with:
"prepend-autoloader": false,
in composer.json, the laminas-zendframework-bridge registers an autoloader by
itself and prepends it.
This autoloader will not match anything more often than not and certainly
nothing that can be loaded by WoltLab Suite's autoloader, thus needlessly
burning CPU cycles.
Fix this by:
1. Explicitly prepending WoltLab Suite's autoloader in the call to
`spl_register_autoload()`.
2. Loading composer's autoloader (and by extension the autoloader of the
bridge) before loading core.functions.php which will load WoltLab Suite's
autoloader.
WoltLab [Tue, 1 Mar 2022 18:33:43 +0000 (18:33 +0000)]
Updating minified JavaScript files
Alexander Ebert [Tue, 1 Mar 2022 18:29:10 +0000 (19:29 +0100)]
Skip the spiderID for ACP requests
The legacy session might not exist for guests that did not access the frontend first.
Tim Düsterhus [Tue, 1 Mar 2022 16:06:42 +0000 (17:06 +0100)]
Merge branch '5.4'
Alexander Ebert [Tue, 1 Mar 2022 15:26:53 +0000 (16:26 +0100)]
Improved the prompt for desktop notifications
See https://www.woltlab.com/community/thread/294700-erlaubnis-f%C3%BCr-benachrichtungen-nicht-ohne-explizite-nutzer-interaktion-anfragen/
Tim Düsterhus [Tue, 1 Mar 2022 13:51:13 +0000 (14:51 +0100)]
Merge pull request #4682 from WoltLab/systemcheck-php
Update PHP versions in SystemCheckPage
Tim Düsterhus [Tue, 1 Mar 2022 13:47:16 +0000 (14:47 +0100)]
Improve phrasing of deprecation message for old PHP versions
Co-authored-by: Alexander Ebert <ebert@woltlab.com>
Tim Düsterhus [Tue, 1 Mar 2022 12:32:30 +0000 (13:32 +0100)]
Merge pull request #4683 from WoltLab/spiderId-lookup
Improve performance of SessionHandler::getSpiderID()
Tim Düsterhus [Tue, 1 Mar 2022 11:50:41 +0000 (12:50 +0100)]
Improve performance of SessionHandler::getSpiderID()
99f28057e7aeb29ed6728917174fd8fc6b7bb1a1 already optimized this to avoid the
need of calling ->getSpiderID() for logged-in users, but guest sessions still
call ->getSpiderID() on every request to look up the legacy session.
This commit massively improves the performance of ->getSpiderID() for all
cases, but especially for requests where no spider can be matched. The latter
previously required a full O(n) search across the spider list and thus was the
worst case situation. This worst case situation likely happened for the vast
majority of guest requests. But even cases where a spider can be matched will
benefit from this.
The improvements are achieved by two things:
1. The size of the cache that needs to be read and unserialized is reduced from
87k to 17k.
2. Instead of searching linearly through the list of spiders, needing to
implicitly call ->__get() twice for each, the matching is performed by an
optimized regular expression that effectively implements a prefix tree. If this
regular expression matches, then the spiderID will be efficiently looked up in
an array that is keyed by the matched string.
Numbers for 10,000 calls to ->getSpiderID() on my computer running PHP 8.1:
- Google Bot: From 0.44s down to 0.14s.
- Firefox 98: From 1.05s down to 0.07s.
Tim Düsterhus [Tue, 1 Mar 2022 10:22:32 +0000 (11:22 +0100)]
Update PHP versions in SystemCheckPage
Alexander Ebert [Mon, 28 Feb 2022 16:45:50 +0000 (17:45 +0100)]
Skip the username for moderation queues
It provides little value, because the entry is all about the entry. Stripping the username cleans up the UI in the drop-down menu.
Alexander Ebert [Mon, 28 Feb 2022 16:44:20 +0000 (17:44 +0100)]
Display the username list in the user menu below
Joshua Rüsweg [Mon, 28 Feb 2022 13:43:09 +0000 (14:43 +0100)]
Merge pull request #4662 from WoltLab/5.5-poll-js
Rework Poll JS to TypeScript
joshuaruesweg [Mon, 28 Feb 2022 13:25:53 +0000 (14:25 +0100)]
Remove `PollAction` class
joshuaruesweg [Mon, 28 Feb 2022 13:22:56 +0000 (14:22 +0100)]
Move Poll module out of Manager dir
joshuaruesweg [Mon, 28 Feb 2022 12:55:11 +0000 (13:55 +0100)]
Apply suggestions from code review
Tim Düsterhus [Mon, 28 Feb 2022 12:12:10 +0000 (13:12 +0100)]
Merge branch '5.3' into 5.4
Tim Düsterhus [Mon, 28 Feb 2022 12:10:16 +0000 (13:10 +0100)]
Validate the messageObjectType in MessagePreviewAction::validateGetMessagePreview()
Tim Düsterhus [Mon, 28 Feb 2022 12:03:52 +0000 (13:03 +0100)]
Merge branch '5.3' into 5.4
Tim Düsterhus [Mon, 28 Feb 2022 12:02:17 +0000 (13:02 +0100)]
Validate the object type definition in CommentAction::validateObjectType()
Tim Düsterhus [Mon, 28 Feb 2022 10:21:40 +0000 (11:21 +0100)]
Merge branch '5.4'
Tim Düsterhus [Mon, 28 Feb 2022 10:20:35 +0000 (11:20 +0100)]
Fix success message in ApplicationManagementForm
Fixes #4679
Tim Düsterhus [Mon, 28 Feb 2022 09:36:05 +0000 (10:36 +0100)]
Merge branch '5.4'
Tim Düsterhus [Mon, 28 Feb 2022 09:34:34 +0000 (10:34 +0100)]
Update composer dependencies
Alexander Ebert [Sun, 27 Feb 2022 13:50:49 +0000 (14:50 +0100)]
Use static values to determine the `spiderID`
The `spiderID` can never be set for logged-in users and for guests this value is tracked in the legacy session for now.
This prevents the loading and processing of the chunky spider cache for most requests.
Alexander Ebert [Sun, 27 Feb 2022 13:07:06 +0000 (14:07 +0100)]
Skip the replacement of the negative sign for > 0
Alexander Ebert [Sun, 27 Feb 2022 12:56:19 +0000 (13:56 +0100)]
Improved the performance of the autoloader
Using `isset()` is faster than using `count()` because it is a language construct and we only need to know if the index `1` exists. The autoloader is invoked hundreds of times per request, saving us ~1ms in total.
Tim Düsterhus [Thu, 24 Feb 2022 10:57:40 +0000 (11:57 +0100)]
Merge pull request #4678 from WoltLab/update-cronjob-randomize
Randomize the times of the data update cronjobs
Tim Düsterhus [Thu, 24 Feb 2022 10:35:41 +0000 (11:35 +0100)]
Ignore non-HTTP schemes for URL unfurling
Tim Düsterhus [Thu, 24 Feb 2022 08:38:47 +0000 (09:38 +0100)]
Derive the time of the refreshSearchRobots cronjob from refreshPackageUpdates
Tim Düsterhus [Wed, 23 Feb 2022 15:59:40 +0000 (16:59 +0100)]
Randomize the times of the data update cronjobs when upgrading to 5.5
Tim Düsterhus [Wed, 23 Feb 2022 15:55:52 +0000 (16:55 +0100)]
Randomize the times of the data update cronjobs
This prevents requests spikes at package servers at 2:00 UTC every other day.
With the time of the update cronjobs randomized, the package list updater will
now run daily.
Alexander Ebert [Wed, 23 Feb 2022 18:41:21 +0000 (19:41 +0100)]
Improved the detection of pasted redundant styles
joshuaruesweg [Mon, 21 Feb 2022 15:47:38 +0000 (16:47 +0100)]
Remove superfluous method description
joshuaruesweg [Mon, 21 Feb 2022 15:40:38 +0000 (16:40 +0100)]
Remove JS equivalents for removed TS files
Marcel Werk [Mon, 21 Feb 2022 15:10:04 +0000 (16:10 +0100)]
Missing autofocus in login form
joshuaruesweg [Mon, 21 Feb 2022 14:30:36 +0000 (15:30 +0100)]
Apply suggestions from code review
Tim Düsterhus [Mon, 21 Feb 2022 14:18:28 +0000 (15:18 +0100)]
Merge remote-tracking branch 'origin/master'
Tim Düsterhus [Mon, 21 Feb 2022 14:17:11 +0000 (15:17 +0100)]
Merge branch '5.4'
Tim Düsterhus [Mon, 21 Feb 2022 14:14:17 +0000 (15:14 +0100)]
Merge branch 'mysql-search-query-parser' into 5.4
Tim Düsterhus [Mon, 21 Feb 2022 14:12:38 +0000 (15:12 +0100)]
Fix handling of queries ending in a lone quote in MysqlSearchEngine::splitIntoTerms()
Tim Düsterhus [Mon, 21 Feb 2022 14:08:02 +0000 (15:08 +0100)]
Fix handling of quoted parentheses in MysqlSearchEngine::splitIntoTerms()
Tim Düsterhus [Mon, 21 Feb 2022 13:51:55 +0000 (14:51 +0100)]
Fix typo in comment in MysqlSearchEngine::splitIntoTerms()
Alexander Ebert [Mon, 21 Feb 2022 13:12:05 +0000 (14:12 +0100)]
Marking all items as read did not reset the count
Alexander Ebert [Mon, 21 Feb 2022 12:45:14 +0000 (13:45 +0100)]
Outdated unread counter was not reset properly
Tim Düsterhus [Mon, 21 Feb 2022 09:05:12 +0000 (10:05 +0100)]
Alexander Ebert [Fri, 18 Feb 2022 17:21:46 +0000 (18:21 +0100)]
Simplified the access in `User::__get()`
Called 500-1k times per request, this change reduces the time spent inside this method by about 40% on average.
Alexander Ebert [Fri, 18 Feb 2022 17:10:41 +0000 (18:10 +0100)]
Simplify the access to DBO::$data
The new code is a bit more precise and is 2-3x times faster. It is not much, but this method is called thousands of times on average requests.
Alexander Ebert [Fri, 18 Feb 2022 15:17:28 +0000 (16:17 +0100)]
Reverted the implicit expansion of blocked content
This reverts
936edda0bd3537095d1bd01e96682c40796b1b2f which implicitly expanded a message when it is being accessed through an URL anchor.
However, these URLs are also generated when accessing the last post of a thread which is merely a jump to the end.
Alexander Ebert [Fri, 18 Feb 2022 13:49:18 +0000 (14:49 +0100)]
Fixed the code style of the SCSS file
Alexander Ebert [Fri, 18 Feb 2022 13:44:59 +0000 (14:44 +0100)]
Improved the jump to the selected option
Tim Düsterhus [Fri, 18 Feb 2022 13:36:36 +0000 (14:36 +0100)]
Merge branch '5.4'
Tim Düsterhus [Fri, 18 Feb 2022 13:32:34 +0000 (14:32 +0100)]
Throw UserInputException for invalid className in AJAXInvokeAction/AJAXProxyAction
As the `className` is a user-provided value, we must throw a UserInputException
for proper error handling.
Alexander Ebert [Fri, 18 Feb 2022 10:36:41 +0000 (11:36 +0100)]
`word-break: break-word` now has good support
We had to use `word-break: break-all` previously because of inconsistent browser support, but that causes inline code to always break inside, even if it would be possibly to break or wrap nicely.
Tim Düsterhus [Fri, 18 Feb 2022 09:50:48 +0000 (10:50 +0100)]
Use `http_build_query()` to construct the link parameters in DevtoolsProjectPipEntryListPage
Alexander Ebert [Wed, 16 Feb 2022 19:17:33 +0000 (20:17 +0100)]
Incorrect behavior of the ACP search, support scrolling
Tim Düsterhus [Wed, 16 Feb 2022 15:25:06 +0000 (16:25 +0100)]
Add trailing comma to maxItems in __userFormField
Alexander Ebert [Tue, 15 Feb 2022 20:16:40 +0000 (21:16 +0100)]
Superfluous whitespace
Alexander Ebert [Tue, 15 Feb 2022 20:15:53 +0000 (21:15 +0100)]
Improper comparison of user groups containing non-ASCII characters