Tim Düsterhus [Mon, 28 Nov 2022 09:53:19 +0000 (10:53 +0100)]
Use array-shape as the return type for ISearchEngine::getInnerJoin()
Alexander Ebert [Sat, 26 Nov 2022 17:57:04 +0000 (18:57 +0100)]
Add `SearchEngine::isContextAware()`
The helper method is used for runtime optimizations to avoid index rebuilds for backends that are not context aware.
Alexander Ebert [Fri, 25 Nov 2022 15:17:31 +0000 (16:17 +0100)]
Fix the use of the context filter
Alexander Ebert [Fri, 25 Nov 2022 12:39:22 +0000 (13:39 +0100)]
Add support for context filters when querying the search backend
Alexander Ebert [Fri, 25 Nov 2022 11:41:55 +0000 (12:41 +0100)]
Add prototype for a search index that is aware of a message’s context
Tim Düsterhus [Fri, 25 Nov 2022 11:25:43 +0000 (12:25 +0100)]
Improve formatting in PackageInstallationNodeBuilder
Tim Düsterhus [Fri, 25 Nov 2022 11:20:25 +0000 (12:20 +0100)]
Add support for `<void/>` instructions to PackageManifest
Tim Düsterhus [Fri, 25 Nov 2022 11:02:02 +0000 (12:02 +0100)]
Merge branch '5.5'
Tim Düsterhus [Fri, 25 Nov 2022 11:01:05 +0000 (12:01 +0100)]
Merge pull request #5142 from WoltLab/php-ddl-index-validate
Fix validation of changed indices in PHP DDL
Tim Düsterhus [Thu, 24 Nov 2022 10:17:33 +0000 (11:17 +0100)]
Fix validation of changed indices in PHP DDL
The validation of the to-be-performed DDL operation currently identifies
indices by their data (i.e. column list and type), whereas the actual DDL
operation uses the `->diffIndices()` operation which also takes into account
the name of the index.
This mismatch allows a package to drop a foreign index, consider the following
situation:
Package A:
DatabaseTable::create('wcf1_test')
->columns([
NotNullInt10DatabaseTableColumn::create('a'),
NotNullInt10DatabaseTableColumn::create('b'),
])
->indices([
DatabaseTableIndex::create('testing')
->columns(['a']),
])
The package creates a table with two columns and a named index (“testing”) that
includes one of the columns.
Now Package B:
DatabaseTable::create('wcf1_test')
->indices([
DatabaseTableIndex::create('testing')
->columns(['a', 'b'])
->drop(),
])
This definition drops the named index (“testing”), but with a different column
definition. Thus the validation believes the indices to be different, allowing
the operation to proceed. The actual operation however identifies the index by
its name and thus drops the “testing” index that belongs to a different
package.
Tim Düsterhus [Fri, 25 Nov 2022 08:57:50 +0000 (09:57 +0100)]
Merge branch '5.5'
Alexander Ebert [Thu, 24 Nov 2022 17:08:53 +0000 (18:08 +0100)]
Release 5.5.7
Tim Düsterhus [Thu, 24 Nov 2022 14:52:37 +0000 (15:52 +0100)]
Merge branch '5.5'
Tim Düsterhus [Thu, 24 Nov 2022 14:52:24 +0000 (15:52 +0100)]
Update list of deleted phrases
see WoltLab/com.woltlab.wcf.conversation#180
Alexander Ebert [Thu, 24 Nov 2022 14:39:19 +0000 (15:39 +0100)]
The `$value` for `getSearchFormElement()` is nullable
See https://www.woltlab.com/community/thread/297958-fehler-bei-suche-mit-php-8-1/
Alexander Ebert [Thu, 24 Nov 2022 14:34:08 +0000 (15:34 +0100)]
Revert "`getSearchFormElement()` expects a string for the value parameter"
This reverts commit
d2beab69c1aee0a33cfe8bdb7d967da2300b1691.
Tim Düsterhus [Thu, 24 Nov 2022 14:09:41 +0000 (15:09 +0100)]
Merge pull request #5143 from WoltLab/require-absolute-path
Use absolute paths in require() calls during script init
Tim Düsterhus [Thu, 24 Nov 2022 13:58:52 +0000 (14:58 +0100)]
Use absolute paths in require() calls during script init
Relative paths in `require()` are relative to the accessed “entrypoint” (i.e.
not the script that calls `require()`). By using absolute paths the requiring
is more resilient and more specifically the `acp/global.php` no longer depends
on an application correctly configuring `RELATIVE_WCF_DIR`, removing one of the
remaining users of the `RELATIVE_*` constants.
Tim Düsterhus [Wed, 23 Nov 2022 11:05:47 +0000 (12:05 +0100)]
Merge pull request #5140 from WoltLab/error-reporting-all
Force enable E_ALL error_reporting
Tim Düsterhus [Wed, 23 Nov 2022 10:55:58 +0000 (11:55 +0100)]
Force enable E_ALL error_reporting
Previously the error_reporting value in php.ini was implicitly used which
might've suppressed some errors, specifically `E_NOTICE` was not reporting by
default in PHP 7.x and earlier. While this is fixed now, since the minimum
version is PHP 8.1, nothing prevents an administrator or webhoster from
reconfiguring the error_reporting themselves.
By configuring E_ALL in WCF.class.php we can ensure a consistent behavior of
the application.
Resolves #5136
Alexander Ebert [Tue, 22 Nov 2022 15:40:15 +0000 (16:40 +0100)]
Fix the icon name
Alexander Ebert [Tue, 22 Nov 2022 15:38:57 +0000 (16:38 +0100)]
Add proper types to `ACPSearchResultList`
Alexander Ebert [Tue, 22 Nov 2022 15:14:59 +0000 (16:14 +0100)]
Localize the hour values using `Intl`
Alexander Ebert [Tue, 22 Nov 2022 14:56:40 +0000 (15:56 +0100)]
Merge branch 'master' of https://github.com/WoltLab/WCF
Alexander Ebert [Tue, 22 Nov 2022 14:56:34 +0000 (15:56 +0100)]
Set the weekdays using the values from Intl
Tim Düsterhus [Tue, 22 Nov 2022 14:53:05 +0000 (15:53 +0100)]
Update composer dependencies
Alexander Ebert [Tue, 22 Nov 2022 14:32:54 +0000 (15:32 +0100)]
Add the helper phrase for the first day of the week
Firefox does not support `Intl.Locale.prototype.weekInfo` yet.
Alexander Ebert [Tue, 22 Nov 2022 14:25:36 +0000 (15:25 +0100)]
Rely on `Intl.DateTimeFormat` for regular date and time formats
Tim Düsterhus [Tue, 22 Nov 2022 13:59:56 +0000 (14:59 +0100)]
Support dynamic phrases for rebuild worker name / description
Tim Düsterhus [Tue, 22 Nov 2022 12:55:00 +0000 (13:55 +0100)]
Merge pull request #5130 from WoltLab/rebuild-worker
Improve registration of rebuild workers
Tim Düsterhus [Mon, 21 Nov 2022 12:36:51 +0000 (13:36 +0100)]
Reduce logic duplication in RegisteredWorker
Tim Düsterhus [Mon, 21 Nov 2022 12:34:46 +0000 (13:34 +0100)]
Improve code clarity in RebuildWorkerCollecting event
Co-authored-by: Alexander Ebert <ebert@woltlab.com>
Tim Düsterhus [Fri, 18 Nov 2022 16:04:54 +0000 (17:04 +0100)]
Improve order of rebuild workers
Tim Düsterhus [Fri, 18 Nov 2022 16:04:02 +0000 (17:04 +0100)]
Drop phrases for deleted rebuild worker
Tim Düsterhus [Fri, 18 Nov 2022 16:03:07 +0000 (17:03 +0100)]
Migrate the existing rebuild worker registration into the bootstrap script
Tim Düsterhus [Fri, 18 Nov 2022 15:42:13 +0000 (16:42 +0100)]
Store the EventHandler in a local variable in the bootstrap script
Tim Düsterhus [Fri, 18 Nov 2022 15:41:08 +0000 (16:41 +0100)]
Allow programmatically collecting rebuild workers
Tim Düsterhus [Tue, 22 Nov 2022 12:48:07 +0000 (13:48 +0100)]
Merge branch '5.5'
Tim Düsterhus [Tue, 22 Nov 2022 12:47:43 +0000 (13:47 +0100)]
Merge pull request #5137 from WoltLab/store-code-refresh
Refresh the package database in Package/QuickInstallation.ts
Tim Düsterhus [Tue, 22 Nov 2022 12:45:58 +0000 (13:45 +0100)]
Merge pull request #5133 from WoltLab/i18n-form-field-one-language
Fix TI18nFormField if only one language is active
Tim Düsterhus [Tue, 22 Nov 2022 11:44:31 +0000 (12:44 +0100)]
Merge branch '5.5'
Tim Düsterhus [Tue, 22 Nov 2022 11:43:04 +0000 (12:43 +0100)]
Update to TypeScript 4.9
Tim Düsterhus [Tue, 22 Nov 2022 11:18:56 +0000 (12:18 +0100)]
Update eslint npm dependency
Tim Düsterhus [Tue, 22 Nov 2022 09:21:21 +0000 (10:21 +0100)]
Refresh the package database in Package/QuickInstallation.ts
Fixes #5135
Tim Düsterhus [Mon, 21 Nov 2022 11:26:55 +0000 (12:26 +0100)]
Fix TI18nFormField if only one language is active
Fixes #5131
Tim Düsterhus [Mon, 21 Nov 2022 11:07:45 +0000 (12:07 +0100)]
Tim Düsterhus [Mon, 21 Nov 2022 10:29:22 +0000 (11:29 +0100)]
Update esbuild npm dependency
Tim Düsterhus [Mon, 21 Nov 2022 10:28:32 +0000 (11:28 +0100)]
Merge branch '5.5'
Tim Düsterhus [Mon, 21 Nov 2022 10:27:39 +0000 (11:27 +0100)]
Update eslint npm dependency
Tim Düsterhus [Mon, 21 Nov 2022 10:26:18 +0000 (11:26 +0100)]
Merge branch '5.5'
Tim Düsterhus [Mon, 21 Nov 2022 09:01:13 +0000 (10:01 +0100)]
Fix erroneous encoding of ampersands in HtmlInputProcessor::convertToHtml()
see
f8deb9077dc485487bf53f9930ff956fbca1127b
see https://www.woltlab.com/community/thread/298042-werden-beim-import-falsch-ersetzt/
Alexander Ebert [Fri, 18 Nov 2022 17:45:45 +0000 (18:45 +0100)]
Remove the dialog from the DOM after it has been closed
Alexander Ebert [Fri, 18 Nov 2022 13:52:37 +0000 (14:52 +0100)]
Add support for async callbacks in `validate`
Tim Düsterhus [Fri, 18 Nov 2022 13:20:56 +0000 (14:20 +0100)]
Fix PHP Codestyle
Tim Düsterhus [Fri, 18 Nov 2022 13:12:48 +0000 (14:12 +0100)]
Add `@since` tag to PackageArchive::getAllUpdateInstructions()
This one is effectively new since 6.0, because it was renamed.
see
eee89934e17ba20e5a55b739ee0533553349bf4d
Tim Düsterhus [Fri, 18 Nov 2022 11:25:15 +0000 (12:25 +0100)]
Merge pull request #5129 from WoltLab/package-fix-update
Fix the package update
Tim Düsterhus [Fri, 18 Nov 2022 11:19:46 +0000 (12:19 +0100)]
Improve readability of `$instructions` fetch in PackageInstallationNodeBuilder::buildPluginNodes()
Tim Düsterhus [Fri, 18 Nov 2022 11:04:37 +0000 (12:04 +0100)]
Merge pull request #5128 from WoltLab/package-downgrade-prevention
Fix downgrade prevention in PackageValidationArchive
Tim Düsterhus [Fri, 18 Nov 2022 09:55:22 +0000 (10:55 +0100)]
Remove PackageArchive::$package
This property is no longer used.
Tim Düsterhus [Fri, 18 Nov 2022 09:53:54 +0000 (10:53 +0100)]
Remove PackageArchive::filterUpdateInstructions()
The method is unused.
Tim Düsterhus [Fri, 18 Nov 2022 09:52:10 +0000 (10:52 +0100)]
Replace `PackageArchive::getUpdateInstructions()` with `getAllUpdateInstructions()`
The filtering of update instructions is a massive design mistake is now
effectively removed. The method is renamed, because the behavior changed quite
a bit. Better fail obviously than silently returning garbage.
Fixes #5094
Tim Düsterhus [Fri, 18 Nov 2022 09:50:34 +0000 (10:50 +0100)]
Use `PackageArchive::getUpdateInstructionsFor()` in PackageInstallationNodeBuilder
Tim Düsterhus [Fri, 18 Nov 2022 09:12:36 +0000 (10:12 +0100)]
Shorten overly long line in PackageInstallationNodeBuilder
Tim Düsterhus [Fri, 18 Nov 2022 09:27:42 +0000 (10:27 +0100)]
Lazily filter update instructions in PackageArchive
As `$this->package` is effectively readonly, this is safe and will not change
the behavior.
Tim Düsterhus [Fri, 18 Nov 2022 09:41:54 +0000 (10:41 +0100)]
Fix downgrade prevention in PackageValidationArchive
This regressed in
5590bc1425b03e1f8d91610b7d3c52ccccb7d338, because
`PackageArchive::isValidUpdate()` checked not just the existence of the
instructions, but also the version numbers.
In practice this regression is only visible for wildcard update instructions,
because otherwise a valid instruction will simply not exist.
Tim Düsterhus [Fri, 18 Nov 2022 09:21:42 +0000 (10:21 +0100)]
Take a package version instead of a package in PackageArchive::getUpdateInstructionsFor()
Tim Düsterhus [Fri, 18 Nov 2022 08:59:49 +0000 (09:59 +0100)]
Add additional types to PackageInstallationNodeBuilder
Tim Düsterhus [Fri, 18 Nov 2022 08:57:36 +0000 (09:57 +0100)]
Add additional types to Install/UninstallPackageAction
Tim Düsterhus [Fri, 18 Nov 2022 08:53:25 +0000 (09:53 +0100)]
Drop redundant PHPDoc type in PackageInstallationStep
Tim Düsterhus [Thu, 17 Nov 2022 15:33:37 +0000 (16:33 +0100)]
Merge branch '5.5'
Tim Düsterhus [Thu, 17 Nov 2022 14:45:29 +0000 (15:45 +0100)]
Remove obsolete `requirejs` dependency from extra/
Tim Düsterhus [Thu, 17 Nov 2022 14:45:03 +0000 (15:45 +0100)]
Move `@woltlab/r.js` into dependencies from devDependencies
Tim Düsterhus [Thu, 17 Nov 2022 14:38:37 +0000 (15:38 +0100)]
Use explicit git+https URL for r.js
Tim Düsterhus [Thu, 17 Nov 2022 14:32:52 +0000 (15:32 +0100)]
Make use of `@woltlab/r.js`
Tim Düsterhus [Thu, 17 Nov 2022 14:32:25 +0000 (15:32 +0100)]
Install `@woltlab/r.js` in extra/
Alexander Ebert [Thu, 17 Nov 2022 11:44:23 +0000 (12:44 +0100)]
Release 5.5.7 dev 1
WoltLab [Thu, 17 Nov 2022 11:33:20 +0000 (11:33 +0000)]
Updating minified JavaScript files
Tim Düsterhus [Thu, 17 Nov 2022 08:41:23 +0000 (09:41 +0100)]
Merge branch '5.5'
Alexander Ebert [Wed, 16 Nov 2022 16:30:05 +0000 (17:30 +0100)]
Construct the profile url using just the user id
The attempt to embed the username into the URL is flawed, because it provides none of the server side transformations performed when naturally generating those URLs.
The currently implementation causes a redirect for most usernames anyway. Besides those redirects take place early in the processing of the controller and thus are acceptable.
Removing the username from the artificially constructed URL will now always cause a redirect, but do not break web servers with less permissive rewrite rules.
See https://www.woltlab.com/community/thread/297758-url-memberlist-suche-%C3%ACst-falsch/
Tim Düsterhus [Wed, 16 Nov 2022 16:17:11 +0000 (17:17 +0100)]
Add some additional types to PackageInstallationNodeBuilder
Tim Düsterhus [Wed, 16 Nov 2022 15:49:14 +0000 (16:49 +0100)]
Merge branch '5.5'
Tim Düsterhus [Wed, 16 Nov 2022 15:17:26 +0000 (16:17 +0100)]
Merge pull request #5126 from WoltLab/package-cleanup
Further clean up package archive handling logic
Alexander Ebert [Wed, 16 Nov 2022 12:41:34 +0000 (13:41 +0100)]
Schedule the restore of the scroll position for the next loop
The previous delay of 1ms causes issue by actions that also try to delay their execution to the next run of the event loop. These will get executed while the page offset has not been adjusted, causing the calculations to be incorrect.
This primarily affects the editor which makes use of `setTimeout()` to workaround some browser limitations.
See https://www.woltlab.com/community/thread/297841-einf%C3%BCgen-von-links-in-den-editor/
Tim Düsterhus [Wed, 16 Nov 2022 11:14:56 +0000 (12:14 +0100)]
Remove PackageArchive::isValidUpdate()
The method relies on the stateful `PackageArchive::$package` property and
`PackageArchive::filterUpdateInstructions()` which is super intransparent.
The last remaining user was removed in the previous commit.
see #5094
Tim Düsterhus [Wed, 16 Nov 2022 11:13:42 +0000 (12:13 +0100)]
Use `PackageArchive::getUpdateInstructionsFor()` in PackageValidationArchive
This removes the only user of `PackageArchive::isValidUpdate()` which will be
removed in a follow-up commit.
Tim Düsterhus [Wed, 16 Nov 2022 11:12:39 +0000 (12:12 +0100)]
Add PackageArchive::getUpdateInstructionsFor()
Tim Düsterhus [Wed, 16 Nov 2022 11:10:05 +0000 (12:10 +0100)]
Mark PackageValidationArchive::$archive as `readonly`
Tim Düsterhus [Wed, 16 Nov 2022 11:08:48 +0000 (12:08 +0100)]
Remove unused PackageValidationArchive::$parent property
Tim Düsterhus [Tue, 15 Nov 2022 14:59:48 +0000 (15:59 +0100)]
Narrow `protected` to `private` in PackageValidationArchive
Tim Düsterhus [Tue, 15 Nov 2022 14:58:27 +0000 (15:58 +0100)]
Mark PackageValidationArchive as final
Tim Düsterhus [Tue, 15 Nov 2022 14:50:37 +0000 (15:50 +0100)]
Remove useless check for `applicationDirectory` in PackageInstallationDispatcher::installPackage()
The key will always exist in the `$nodeData`.
Tim Düsterhus [Tue, 15 Nov 2022 14:48:17 +0000 (15:48 +0100)]
Remove useless conditions in PackageInstallationDispatcher::installPackage()
The `foreach()` loops handle empty arrays just fine.
Tim Düsterhus [Wed, 16 Nov 2022 10:34:49 +0000 (11:34 +0100)]
Update focus-trap and tabbable
Tim Düsterhus [Wed, 16 Nov 2022 10:33:24 +0000 (11:33 +0100)]
Update esbuild
Tim Düsterhus [Wed, 16 Nov 2022 10:32:20 +0000 (11:32 +0100)]
Merge branch '5.5'
Tim Düsterhus [Wed, 16 Nov 2022 10:29:25 +0000 (11:29 +0100)]
Update `@types/google.maps` and `@types/facebook-js-sdk`
Tim Düsterhus [Wed, 16 Nov 2022 10:28:24 +0000 (11:28 +0100)]
Update eslint
Tim Düsterhus [Wed, 16 Nov 2022 10:24:42 +0000 (11:24 +0100)]
Update `tslib`
Tim Düsterhus [Wed, 16 Nov 2022 09:06:57 +0000 (10:06 +0100)]
Merge branch '5.5'
Alexander Ebert [Tue, 15 Nov 2022 17:00:11 +0000 (18:00 +0100)]
Add the CSS class `.formAttachmentListItem` to existing attachments on page load
See https://www.woltlab.com/community/thread/297604-dateianh%C3%A4nge-werden-bei-mehrsprachigkeit-nicht-zwischen-editoren-synchronisiert/