Tim Düsterhus [Wed, 18 May 2022 15:52:03 +0000 (17:52 +0200)]
Merge pull request #4816 from WoltLab/template-engine-psr-7
Add TemplateEngine::fetchStream() to efficiently render a template as a PSR-7 StreamInterface
Tim Düsterhus [Wed, 18 May 2022 14:16:15 +0000 (16:16 +0200)]
Add TemplateEngine::fetchStream() to efficiently render a template as a PSR-7 StreamInterface
Tim Düsterhus [Wed, 18 May 2022 14:13:42 +0000 (16:13 +0200)]
Merge pull request #4815 from WoltLab/wcfsetup-relative-wcf-dir
Remove the need for SetupTemplateCompiler
Tim Düsterhus [Wed, 18 May 2022 13:11:49 +0000 (15:11 +0200)]
Move the output generation in WCFSetup::installPackages() to a more appropriate location
Tim Düsterhus [Wed, 18 May 2022 13:09:30 +0000 (15:09 +0200)]
Remove SetupTemplateCompiler
The implementation only differed from the TemplateCompiler /
TemplateScriptingCompiler by not rejecting the use of RELATIVE_WCF_DIR. As that
usage was removed in the previous commit the SetupTemplateCompiler is obsolete.
Tim Düsterhus [Wed, 18 May 2022 13:07:32 +0000 (15:07 +0200)]
Do not reference `RELATIVE_WCF_DIR` in stepInstallPackages.tpl
Tim Düsterhus [Wed, 18 May 2022 10:48:56 +0000 (12:48 +0200)]
Merge pull request #4814 from WoltLab/wcfsetup-tmp
Clean up the handling of temporary files during WCFSetup
Tim Düsterhus [Tue, 17 May 2022 15:23:55 +0000 (17:23 +0200)]
Always use install.php's __DIR__ as the temporary directory
The previous implementation of `BasicFileUtil::getTempFolder()` was unstable,
as it automatically detected `tmp/` directories in the document root. If
WoltLab Suite Core is installed into the document root, then the extraction of
the files will implicitly create a `tmp/` directory and thus change the temp
folder for the remaining installation.
Tim Düsterhus [Tue, 17 May 2022 15:15:09 +0000 (17:15 +0200)]
Increase the randomness in `TMP_FILE_PREFIX` in install.php
Tim Düsterhus [Wed, 18 May 2022 08:40:30 +0000 (10:40 +0200)]
Remove all extracted temporary files in WCFSetup::installPackages()
Tim Düsterhus [Wed, 18 May 2022 08:38:32 +0000 (10:38 +0200)]
Move the package archives into WCF_DIR/tmp in WCFSetup::installPackages()
This allows for a complete cleanup of the temporary directory.
Tim Düsterhus [Wed, 18 May 2022 08:33:11 +0000 (10:33 +0200)]
Remove error handling for broken archives from WCFSetup
Any errors are generally not recoverable at this point, making the error
handling useless.
Tim Düsterhus [Wed, 18 May 2022 08:10:30 +0000 (10:10 +0200)]
Simplify calculation of `$processNo` in WCFSetup::installPackages()
Similarly to the previous commit we know for sure that no process numbers are
taken yet, so we can hardcode this to 1.
Tim Düsterhus [Wed, 18 May 2022 08:08:26 +0000 (10:08 +0200)]
Remove useless check whether com.woltlab.wcf is already installed in WCFSetup::installPackages()
The database structure was just created in WCFSetup, we know for sure that the
wcf1_package table is empty.
Tim Düsterhus [Wed, 18 May 2022 08:04:56 +0000 (10:04 +0200)]
Remove unneeded decompression of packages in WCFSetup::installPackages()
As indicated in the previous commit, the fact that this decompression did not
happen for Strato implies that it is not actually necessary in practice.
Tim Düsterhus [Wed, 18 May 2022 07:59:08 +0000 (09:59 +0200)]
Remove Strato workaround from WCFSetup
This workaround exists since the very first commit and it's not clear why that
was needed back then. It likely was related to the temporary directory not
being writable or files not being deletable in some cases, but with the change
of WCFSetup's temporary directory anything less than full writing permissions
to the directory mean that WoltLab Suite won't actually run after installation
anyway, making this workaround obsolete.
Also the fact that decompression of the archive does not happen in all cases
implies that the decompression is not actually necessary at this stage, making
that the next candidate for removal.
Tim Düsterhus [Wed, 18 May 2022 09:32:06 +0000 (11:32 +0200)]
Tim Düsterhus [Wed, 18 May 2022 09:30:54 +0000 (11:30 +0200)]
Revert "Remove unneeded `window.onload` callbacks in WCFSetup JavaScript"
This change had the undesired effect that the footer did not show. Instead the
more appropriate `DOMContentLoaded` event should be used.
This reverts commit
99e56d2929be14b1f5141e6a5136ff7c7de6f39d.
Tim Düsterhus [Wed, 18 May 2022 09:17:27 +0000 (11:17 +0200)]
Merge pull request #4813 from WoltLab/wcfsetup-javascript
Simplify JavaScript handling in WCFSetup
Alexander Ebert [Wed, 18 May 2022 09:14:49 +0000 (11:14 +0200)]
Merge pull request #4812 from WoltLab/admin-panel-user-header
Simplified the admin panel‘s user header
Tim Düsterhus [Wed, 18 May 2022 09:06:57 +0000 (11:06 +0200)]
Remove unneeded `window.onload` callbacks in WCFSetup JavaScript
Tim Düsterhus [Wed, 18 May 2022 09:04:49 +0000 (11:04 +0200)]
Disable JavaScript relocation in WCFSetup
There is no benefit to this in WCFSetup, it just increases complexity.
Tim Düsterhus [Wed, 18 May 2022 09:07:42 +0000 (11:07 +0200)]
Merge branch '5.5'
Tim Düsterhus [Wed, 18 May 2022 07:28:58 +0000 (09:28 +0200)]
Fix code style in WCFACP
Apparently PSR-12 allows either brace placement, with PHP-CS-Fixer preferring
the brace on the same line and Intelephense preferring it on the next line. If
a multi-line interface definition would be used here, then the brace must be on
a dedicated line, making Intelephense slightly more right on this one.
However as WCFACP is expected to be touched seldomly, thus seldomly running the
Intelephense formatter, the pragmatic solution is to satisfy PHP-CS-Fixer.
see FriendsOfPHP/PHP-CS-Fixer#6396 for a related issue
Alexander Ebert [Tue, 17 May 2022 15:45:05 +0000 (17:45 +0200)]
Simplified the link to access the frontend
Alexander Ebert [Tue, 17 May 2022 15:43:48 +0000 (17:43 +0200)]
Remove user links expect for the logout
This is still not ideal, the header might need a slight redesign to better represent the logged-in user and the logout button.
Tim Düsterhus [Tue, 17 May 2022 14:59:10 +0000 (16:59 +0200)]
Fix typo in WCFSetup
Tim Düsterhus [Tue, 17 May 2022 14:51:47 +0000 (16:51 +0200)]
Merge pull request #4811 from WoltLab/wcfsetup-finalize
Clean up finalization of WCFSetup
Tim Düsterhus [Tue, 17 May 2022 14:27:07 +0000 (16:27 +0200)]
Remove unneeded `file_exists` check for install files
With the absolute path within the constants we know for sure that these files
must exist.
Tim Düsterhus [Tue, 17 May 2022 14:26:38 +0000 (16:26 +0200)]
Use appropriate constants to identify to-be-deleted install files
Tim Düsterhus [Tue, 17 May 2022 14:23:23 +0000 (16:23 +0200)]
Do not suppress errors during removal of setup files in WCFSetup::installPackages()
It is unsafe if these files remain. Also it is very likely that the system not
actually capable of reliably running WoltLab Suite if something as simple as
deleting a file fails.
Tim Düsterhus [Tue, 17 May 2022 14:21:59 +0000 (16:21 +0200)]
Remove `*Deleted' template variable assignment in WCFSetup::installPackages()
These are not actually referenced in the template.
Tim Düsterhus [Tue, 17 May 2022 13:42:22 +0000 (15:42 +0200)]
Merge pull request #4810 from WoltLab/gzip-file-dynamic-dispatch
Remove dynamic dispatch of common cases from GZipFile
Tim Düsterhus [Tue, 17 May 2022 13:41:00 +0000 (15:41 +0200)]
Remove the `lang` prefilter from WCFSetup's template engine
WCFSetup is not performance critical and the less logic that runs the better.
Tim Düsterhus [Tue, 17 May 2022 13:27:55 +0000 (15:27 +0200)]
Remove list of to-be-installed packages from WCFSetup
This is an incredible performance bottleneck, because it reparses all the
archives in every request.
Tim Düsterhus [Tue, 17 May 2022 13:10:31 +0000 (15:10 +0200)]
Remove GZipFile::$gzopen64
This property is no longer accessible since GZipFile is `final`.
Tim Düsterhus [Tue, 17 May 2022 13:09:12 +0000 (15:09 +0200)]
Mark GZipFile as `final`
There is no good reason to inherit from this class and the performance
optimization for the commonly used method calls might break derived classes
that rely on `->__call()` calling something else.
Tim Düsterhus [Tue, 17 May 2022 13:05:56 +0000 (15:05 +0200)]
Remove the need for dynamic dispatch for common GZipFile methods
`->read()`, `->tell()` and `->seek()` are frequently used methods when parsing
Tar archives. We know for sure that these will be mapped to the corresponding
`gz*` function. Define them statically to avoid the need for repeated
`function_exists()` checks in `__call()`.
Tim Düsterhus [Tue, 17 May 2022 12:47:31 +0000 (14:47 +0200)]
Replace calls to `ord()` in checksum calculation of Tar::readHeader() with a table lookup
This makes Tar header processing much faster, due to the reduced number of function
calls (> 3.1 million calls to `ord()` in a WCFSetup with WoltLab Suite Forum
included).
see
ec4be13babcd7e1579c08f1805412fcc9f3d65c5
Tim Düsterhus [Tue, 17 May 2022 12:33:09 +0000 (14:33 +0200)]
Reduce the number of function calls in Tar::readHeader()
Alexander Ebert [Tue, 17 May 2022 10:48:11 +0000 (12:48 +0200)]
Merge pull request #4785 from WoltLab/remove-multi-domain
Remove multi-domain support
Tim Düsterhus [Tue, 17 May 2022 09:08:10 +0000 (11:08 +0200)]
Merge branch '5.5'
Tim Düsterhus [Tue, 17 May 2022 09:07:15 +0000 (11:07 +0200)]
Merge branch '5.5'
Marcel Werk [Tue, 17 May 2022 08:59:25 +0000 (10:59 +0200)]
Unified phrases for deprecated options
Marcel Werk [Fri, 13 May 2022 11:19:15 +0000 (13:19 +0200)]
Deprecated AMP support
PR #4803 accidentally had the wrong target branch.
(cherry picked from commit
8c97dca561b32b3c02f3cb30b32574a8f83b8bd5)
Tim Düsterhus [Tue, 17 May 2022 07:26:28 +0000 (09:26 +0200)]
Fix code style
Tim Düsterhus [Tue, 17 May 2022 07:03:36 +0000 (09:03 +0200)]
Revert "Use checkstyle output for php-cs-fixer"
This change was meant to improve the output, by properly annotating the files,
but instead it makes the output absolutely useless, as it does not include line
numbers.
This reverts commit
65a9247ac9566923cf89e4055c001833622996a6.
Alexander Ebert [Mon, 16 May 2022 20:53:26 +0000 (22:53 +0200)]
Simplified checks against the domain name
Alexander Ebert [Mon, 16 May 2022 20:36:09 +0000 (22:36 +0200)]
Redesigned the rescue mode, enforce shared domain
Marcel Werk [Mon, 16 May 2022 19:47:11 +0000 (21:47 +0200)]
Added documentation of minvalue / maxvalue
Marcel Werk [Mon, 16 May 2022 14:54:01 +0000 (16:54 +0200)]
Email address was not visible in listing of group members
Tim Düsterhus [Mon, 16 May 2022 11:57:35 +0000 (13:57 +0200)]
Remove obsolete check for `->getAttributes()` method on ReflectionFunction/ReflectionMethod
Tim Düsterhus [Mon, 16 May 2022 09:46:17 +0000 (11:46 +0200)]
Deprecate the obsolete WCF::useDesktopNotifications()
Tim Düsterhus [Mon, 16 May 2022 09:42:53 +0000 (11:42 +0200)]
Merge branch 'master' into remove-multi-domain
Tim Düsterhus [Mon, 16 May 2022 09:41:07 +0000 (11:41 +0200)]
Merge branch '5.5'
Tim Düsterhus [Mon, 16 May 2022 09:38:35 +0000 (11:38 +0200)]
Merge remote-tracking branch 'origin/5.5' into 5.5
Alexander Ebert [Sat, 14 May 2022 12:30:38 +0000 (14:30 +0200)]
Incorrect handling of the return focus
Related https://www.woltlab.com/community/thread/295562-inhalte-k%C3%B6nnen-doppelt-gemeldet-werden/
(cherry picked from commit
e9ffefb4d0db61bf8e12b3824c6515ac16fe3812)
Tim Düsterhus [Mon, 16 May 2022 09:37:27 +0000 (11:37 +0200)]
Revert "Suppress errors when disabling the focus trap"
This commit duplicates commit
e9ffefb4d0db61bf8e12b3824c6515ac16fe3812 which is
the cleaner fix, but was accidentally commited to `master` only. We revert this
one to allow for a clean cherry-picking of
e9ffefb4d0db61bf8e12b3824c6515ac16fe3812.
This reverts commit
e7439c4f5fc7daf8d45d2de478c488798ddf463a.
Alexander Ebert [Mon, 16 May 2022 09:36:38 +0000 (11:36 +0200)]
Merge pull request #4808 from WoltLab/55-incorrect-http-204-handling
HTTP 204 does not carry a response type
Tim Düsterhus [Fri, 13 May 2022 09:45:32 +0000 (11:45 +0200)]
Install phpcs via `shivammathur/setup-php`
Apparently the previously used actions uses an out of date phpcs.
(cherry picked from commit
c5cd836751c3fb357b8ddce52a95a83f3ac46347)
Alexander Ebert [Mon, 16 May 2022 09:31:40 +0000 (11:31 +0200)]
Consistent evaluation of the response content type
Alexander Ebert [Mon, 16 May 2022 09:25:55 +0000 (11:25 +0200)]
Proper handling of a 204 response
Alexander Ebert [Mon, 16 May 2022 09:17:50 +0000 (11:17 +0200)]
HTTP 204 does not carry a `content-type`
See https://www.woltlab.com/community/thread/295631-importer-h%C3%A4ngt-bei-reaktionen-100/
Marcel Werk [Mon, 16 May 2022 07:51:10 +0000 (09:51 +0200)]
Merge pull request #4805 from WoltLab/package-xsd
Added documentation of the void element
Tim Düsterhus [Mon, 16 May 2022 07:42:33 +0000 (09:42 +0200)]
Use correct CodeMirror mode for SCSS inputs
`sass` is the indentation based SASS syntax.
Alexander Ebert [Sun, 15 May 2022 11:20:40 +0000 (13:20 +0200)]
Incorrect markup in the authentication dialog
Alexander Ebert [Sun, 15 May 2022 11:04:54 +0000 (13:04 +0200)]
Suppress errors when disabling the focus trap
Alexander Ebert [Sun, 15 May 2022 11:00:09 +0000 (13:00 +0200)]
Use CSS variable to apply the dialog offset
Alexander Ebert [Sun, 15 May 2022 10:38:59 +0000 (12:38 +0200)]
Revert "Dynamic width of code box line numbers"
This reverts commit
d3853740d8304f9703876006db990c2e01642656.
Alexander Ebert [Sun, 15 May 2022 10:37:51 +0000 (12:37 +0200)]
Dynamic width of code box line numbers
This avoids indenting short code listings too much, especially on screens with limited space.
Alexander Ebert [Sun, 15 May 2022 09:17:08 +0000 (11:17 +0200)]
Do not wrap code boxes on mobile
Having long lines wrap multiple times is horrible, overflow scrolling is much better and also quite natural on touch devices.
Alexander Ebert [Sun, 15 May 2022 09:16:26 +0000 (11:16 +0200)]
Better accessibility of code box buttons
Alexander Ebert [Sun, 15 May 2022 09:04:40 +0000 (11:04 +0200)]
Newer iOS versions permit a click near the bottom
Alexander Ebert [Sat, 14 May 2022 17:13:45 +0000 (19:13 +0200)]
Prevent the "external url" indicator to wrap
See https://www.woltlab.com/community/thread/295487-einzelnes-umbrechen-des-externalurl-icons-verhindern/
Alexander Ebert [Sat, 14 May 2022 17:01:48 +0000 (19:01 +0200)]
Expand the active menu item by default
Alexander Ebert [Sat, 14 May 2022 16:12:55 +0000 (18:12 +0200)]
Merge pull request #4807 from WoltLab/55-desktop-notifications
Remove the option to disable desktop notifications
Alexander Ebert [Sat, 14 May 2022 15:10:15 +0000 (17:10 +0200)]
Align the mobile main menu to the right
See https://www.woltlab.com/community/thread/295627-mobil-men%C3%BC-links/
Alexander Ebert [Sat, 14 May 2022 14:32:17 +0000 (16:32 +0200)]
Suppress error messages when aborting `fetch()`
See https://www.woltlab.com/community/thread/295566-fetch-is-aborted-bei-suchergebnissen/
Alexander Ebert [Sat, 14 May 2022 14:07:03 +0000 (16:07 +0200)]
Remove the option to disable desktop notifications
Fixes #4806
Marcel Werk [Sat, 14 May 2022 14:03:45 +0000 (16:03 +0200)]
Added documentation of the void element
Alexander Ebert [Sat, 14 May 2022 12:30:38 +0000 (14:30 +0200)]
Incorrect handling of the return focus
Related https://www.woltlab.com/community/thread/295562-inhalte-k%C3%B6nnen-doppelt-gemeldet-werden/
Tim Düsterhus [Sat, 14 May 2022 12:02:40 +0000 (14:02 +0200)]
Merge pull request #4801 from WoltLab/template-event-javascript-head-include
Remove long-deprecated JavaScript template events from `headInclude.tpl`
Tim Düsterhus [Sat, 14 May 2022 12:02:30 +0000 (14:02 +0200)]
Merge pull request #4800 from WoltLab/convert-encoding
Deprecate StringUtil::convertEncoding()
Tim Düsterhus [Sat, 14 May 2022 12:02:19 +0000 (14:02 +0200)]
Merge pull request #4802 from WoltLab/sensitive-parameter
Use PHP 8.2's SensitiveParameter argument
Marcel Werk [Sat, 14 May 2022 11:46:27 +0000 (13:46 +0200)]
Merge branch '5.4' into 5.5
Marcel Werk [Sat, 14 May 2022 11:46:05 +0000 (13:46 +0200)]
Truncate error message in cronjob log if necessary
Marcel Werk [Sat, 14 May 2022 10:59:48 +0000 (12:59 +0200)]
Support for meta tags during article import
Marcel Werk [Sat, 14 May 2022 10:35:35 +0000 (12:35 +0200)]
Typo
Tim Düsterhus [Fri, 13 May 2022 16:13:53 +0000 (18:13 +0200)]
Merge branch 'master' into remove-multi-domain
Tim Düsterhus [Fri, 13 May 2022 14:05:24 +0000 (16:05 +0200)]
Remove accidentally commited bootstrap.php
see
4f33a332b8aaf66e6c2fb1c9919063146c328c56
Tim Düsterhus [Fri, 13 May 2022 14:01:16 +0000 (16:01 +0200)]
Use Guzzle in PackageAction::searchForPurchasedItems()
see #4281
Tim Düsterhus [Fri, 13 May 2022 13:52:49 +0000 (15:52 +0200)]
Use Guzzle in PackageUpdateDispatcher::getPurchasedVersions()
see #4281
Marcel Werk [Fri, 13 May 2022 11:31:01 +0000 (13:31 +0200)]
Merge pull request #4803 from WoltLab/deprecate-amp
Deprecated AMP support
Marcel Werk [Fri, 13 May 2022 11:19:15 +0000 (13:19 +0200)]
Deprecated AMP support
Tim Düsterhus [Fri, 13 May 2022 10:08:13 +0000 (12:08 +0200)]
Replace `\wcf\SensitiveArgument` by `\SensitiveParameter`
Tim Düsterhus [Fri, 13 May 2022 10:07:06 +0000 (12:07 +0200)]
Deprecate `\wcf\SensitiveArgument`
Tim Düsterhus [Fri, 13 May 2022 10:06:03 +0000 (12:06 +0200)]
Add support for PHP 8.2's native SensitiveParameter attribute
Tim Düsterhus [Fri, 13 May 2022 09:50:59 +0000 (11:50 +0200)]
Use checkstyle output for php-cs-fixer
Tim Düsterhus [Fri, 13 May 2022 09:45:32 +0000 (11:45 +0200)]
Install phpcs via `shivammathur/setup-php`
Apparently the previously used actions uses an out of date phpcs.
Tim Düsterhus [Fri, 13 May 2022 09:39:09 +0000 (11:39 +0200)]
Merge branch '5.5'