Migrating from WSC 3.0 - PHP#
Approval-System for Comments#
Comments can now be set to require approval by a moderator before being published. This feature is disabled by default if you do not provide a permission in the manager class, enabling it requires a new permission that has to be provided in a special property of your manage implementation.
1 2 3 4
Raw HTML in User Activity Events#
User activity events were previously encapsulated inside
<div class="htmlContent">…</div>, with impacts on native elements such as lists. You can now disable the class usage by defining your event as raw HTML:
1 2 3 4 5
Permission to View Likes of an Object#
Being able to view the like summary of an object was restricted to users that were able to like the object itself. This creates situations where the object type in general is likable, but the particular object cannot be liked by the current users, while also denying them to view the like summary (but it gets partly exposed through the footer note/summary!).
Implement the interface
\wcf\data\like\IRestrictedLikeObjectTypeProvider in your object provider to add support for this new permission check.
1 2 3 4 5 6 7
Developer Tools: Sync Feature#
The synchronization feature of the newly added developer tools works by invoking a package installation plugin (PIP) outside of a regular installation, while simulating the basic environment that is already exposed by the API.
However, not all PIPs qualify for this kind of execution, especially because it could be invoked multiple times in a row by the user. This is solved by requiring a special marking for PIPs that have no side-effects (= idempotent) when invoked any amount of times with the same arguments.
There's another feature that allows all matching PIPs to be executed in a row using a single button click. In order to solve dependencies on other PIPs, any implementing PIP must also provide the method
getSyncDependencies() that returns the dependent PIPs in an arbitrary order.
1 2 3 4 5 6 7
Media providers were added through regular SQL queries in earlier versions, but this is neither convenient, nor did it offer a reliable method to update an existing provider. WoltLab Suite 3.1 adds a new
mediaProvider-PIP that also offers a
className parameter to off-load the result evaluation and HTML generation.
1 2 3 4 5 6 7 8 9 10
The full match is provided for
$url, while any capture groups from the regular expression are assigned to
1 2 3 4 5 6
Re-Evaluate HTML Messages#
You need to manually set the disallowed bbcodes in order to avoid unintentional bbcode evaluation. Please see this commit for a reference implementation inside worker processes.
The HtmlInputProcessor only supported two ways to handle an existing HTML message:
- Load the string through
process()and run it through the validation and sanitation process, both of them are rather expensive operations and do not qualify for rebuild data workers.
- Detect embedded content using
processEmbeddedContent()which bypasses most tasks that are carried out by
process()which aren't required, but does not allow a modification of the message.
The newly added method
reprocess($message, $objectType, $objectID) solves this short-coming by offering a full bbcode and text re-evaluation while bypassing any input filters, assuming that the input HTML was already filtered previously.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17