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
Tim Düsterhus [Tue, 15 Feb 2022 15:21:53 +0000 (16:21 +0100)]
Merge branch '5.4'
Alexander Ebert [Tue, 15 Feb 2022 13:58:30 +0000 (14:58 +0100)]
Merge branch '5.3' into 5.4
Alexander Ebert [Tue, 15 Feb 2022 13:54:23 +0000 (14:54 +0100)]
Release 5.3.20
Alexander Ebert [Tue, 15 Feb 2022 13:28:07 +0000 (14:28 +0100)]
Release 5.4.14
Tim Düsterhus [Tue, 15 Feb 2022 12:07:32 +0000 (13:07 +0100)]
Merge branch '5.4'
Tim Düsterhus [Tue, 15 Feb 2022 12:05:10 +0000 (13:05 +0100)]
Add `trophyPoints` to User's `@property-read`
Resolves #4669
Alexander Ebert [Mon, 14 Feb 2022 16:29:12 +0000 (17:29 +0100)]
Release 5.4.14 dev 2
WoltLab [Mon, 14 Feb 2022 16:28:21 +0000 (16:28 +0000)]
Updating minified JavaScript files
Alexander Ebert [Mon, 14 Feb 2022 16:14:00 +0000 (17:14 +0100)]
Work-around for the inconsistent selection handling in iOS 15
See https://www.woltlab.com/community/thread/294136-ios-text-markieren-link-einf%C3%BCgen-geht-nicht/
Alexander Ebert [Mon, 14 Feb 2022 14:50:30 +0000 (15:50 +0100)]
Clamp the date value if it exceeds the `maxDate`
See https://www.woltlab.com/community/thread/294169-min-max-datepicker-falscher-monat/
Tim Düsterhus [Mon, 14 Feb 2022 14:40:58 +0000 (15:40 +0100)]
Merge branch '5.4'
joshuaruesweg [Mon, 14 Feb 2022 14:40:05 +0000 (15:40 +0100)]
Move PollAction Page related functions to DBO actions
Tim Düsterhus [Mon, 14 Feb 2022 13:39:57 +0000 (14:39 +0100)]
Fix PHP 8.0/8.1 compatibility of phpline.phar
mutec [Mon, 14 Feb 2022 13:07:51 +0000 (14:07 +0100)]
Fix anchor link in i18n article add template
This was broken in
c8abd7df4a2c0e434964c66ef86d236613e11fe4.
Closes #4670
[Tim: Adjusted commit message to reference the original commit]
Marcel Werk [Sun, 13 Feb 2022 17:04:09 +0000 (18:04 +0100)]
Fixed exception in the combined installation of an application in dev mode
Alexander Ebert [Sun, 13 Feb 2022 15:57:31 +0000 (16:57 +0100)]
Implicitly expand messages from blocked users when following a permalink
See https://www.woltlab.com/community/thread/294218-verlinkung-zu-beitr%C3%A4gen-von-blockierten-nutzern/
Marcel Werk [Sun, 13 Feb 2022 15:39:12 +0000 (16:39 +0100)]
Individual settings for boxes were unintentionally overwritten during update
Tim Düsterhus [Fri, 11 Feb 2022 15:20:47 +0000 (16:20 +0100)]
Merge pull request #4668 from WoltLab/session-update-once-per-minute
Update `wcf1_user_session` only once per minute
Tim Düsterhus [Fri, 11 Feb 2022 14:18:01 +0000 (15:18 +0100)]
Update `wcf1_user_session` only once per minute
Tim Düsterhus [Fri, 11 Feb 2022 13:47:28 +0000 (14:47 +0100)]
Merge branch '5.4'
Alexander Ebert [Thu, 10 Feb 2022 17:00:41 +0000 (18:00 +0100)]
Release 5.4.14 dev 1
WoltLab [Thu, 10 Feb 2022 16:58:27 +0000 (16:58 +0000)]
Updating minified JavaScript files
Marcel Werk [Wed, 9 Feb 2022 17:58:49 +0000 (18:58 +0100)]
Fully automate the "rebuild all" function
Closes #4667
Tim Düsterhus [Wed, 9 Feb 2022 12:49:35 +0000 (13:49 +0100)]
Merge pull request #4666 from WoltLab/avatar-importer
Improve UserAvatarImporter
Tim Düsterhus [Wed, 9 Feb 2022 11:33:18 +0000 (12:33 +0100)]
Do not trust the source file hash in UserAvatarImporter
see
5969fa3dfada7df170ff10b8c4d8bf349c38cef9
Tim Düsterhus [Wed, 9 Feb 2022 11:32:09 +0000 (12:32 +0100)]
Make UserAvatarImporter determine the extension based on the mime type
Resolves #4665
Tim Düsterhus [Wed, 9 Feb 2022 11:31:29 +0000 (12:31 +0100)]
Check `is_readable()` in UserAvatarImporter
Tim Düsterhus [Tue, 8 Feb 2022 15:57:45 +0000 (16:57 +0100)]
Merge branch '5.4'
Tim Düsterhus [Tue, 8 Feb 2022 15:45:26 +0000 (16:45 +0100)]
Merge pull request #4664 from WoltLab/formbuilder-checkbox-ajax
Add `CheckedVoid` form builder data handler for CheckboxFormField
Tim Düsterhus [Tue, 8 Feb 2022 14:54:22 +0000 (15:54 +0100)]
Add `CheckedVoid` form builder data handler for CheckboxFormField
The `Checked` data handler is not usable for the CheckboxFormField, because its
behavior differs from the non-AJAX behavior by always sending a value whereas
checkboxes that are not checked will not send anything within a regular form.
It was considered to simply reuse the `readValue()` implementation in
BooleanFormField, because it appears to do the right thing at a glance. However
this would effectively revert
7d36c55726af2b5b9d9ab1706a05ccf5e52e84b8 which is
a fix to allow unchecking checkboxes that are checked by default.
Also matching the behavior of AJAX and non-AJAX forms 100% is considered a good
thing, so a new JavaScript module to handle this, is the best solution.
Tim Düsterhus [Tue, 8 Feb 2022 09:15:21 +0000 (10:15 +0100)]
Reject YEAR(2) in PHP DDL
Length 2 for YEAR columns is not supported by MySQL 8 and not really useful for
older versions either:
https://dev.mysql.com/doc/refman/8.0/en/year.html
> MySQL 8.0 does not support the 2-digit YEAR(2) data type permitted in older
> versions of MySQL. For instructions on converting to 4-digit YEAR, see
> 2-Digit YEAR(2) Limitations and Migrating to 4-Digit YEAR, in MySQL 5.7
> Reference Manual.
Tim Düsterhus [Tue, 8 Feb 2022 09:12:46 +0000 (10:12 +0100)]
Merge branch '5.4'
Tim Düsterhus [Tue, 8 Feb 2022 09:12:31 +0000 (10:12 +0100)]
Merge branch '5.3' into 5.4
Tim Düsterhus [Tue, 8 Feb 2022 09:07:00 +0000 (10:07 +0100)]
Ignore `length` when diffing YearDatabaseTableColumn
Similarly to INT columns MySQL 8 ignores the length of YEAR columns:
https://dev.mysql.com/doc/refman/8.0/en/year.html
> As of MySQL 8.0.19, the YEAR(4) data type with an explicit display width is
> deprecated and you should expect support for it to be removed in a future
> version of MySQL. Instead, use YEAR without a display width, which has the
> same meaning.
Marcel Werk [Mon, 7 Feb 2022 16:50:52 +0000 (17:50 +0100)]
Show direct link to media file in admin panel
Closes #4663
joshuaruesweg [Mon, 7 Feb 2022 13:31:47 +0000 (14:31 +0100)]
Apply changes from codereview
joshuaruesweg [Mon, 7 Feb 2022 13:10:06 +0000 (14:10 +0100)]
Remove `WCF.Poll.Manager` module