Repository navigation
Conversation
Moving media is part of editing them: the detail form saves the category via `MediaHandler::edit()`, and the bulk move of the media list now does so as well instead of updating the table directly. Both dispatch `MediaUpdated`, whose `previous` state shows a changed category, so the separately dispatched `MEDIA_MOVED` is removed. A rector rule maps it to `MediaUpdated`. `GENERATE_FILTER` let extensions modify the generated PHP code of the content cache; the rendered output can be modified via `ART_CONTENT`, `SliceOutput` or `OUTPUT_FILTER` instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First step of the remaining structure/media pool extension point cleanup.
MEDIA_MOVED→MediaUpdatedMEDIA_MOVEDwas dispatched by the pages, not by the handler:MediaHandler::edit()(dispatchingMediaUpdated) and dispatchedMEDIA_MOVEDafterwards by hand,rex_mediadirectly, bypassing the handler and thusMediaUpdated.Unlike articles (separate operation and permission, hence
ArticleMoved), moving media is part of editing them. So the bulk move now callsMediaHandler::edit()with just thecategory_idas well, andMEDIA_MOVEDis removed: a move is aMediaUpdatedwhosepreviousstate has a differentcategoryId. A separateMediaMovedwould have to be dispatched in addition toMediaUpdatedfor the detail form, i.e. two events for one change.The rector rule maps
MEDIA_MOVEDtoMediaUpdated, likeART_META_UPDATED→ArticleUpdatedin #6778. Usage in public addons: none found except redaxo.org.GENERATE_FILTERremovedIt let extensions modify the generated PHP code of the content cache. The rendered output can be modified via
ART_CONTENT,SliceOutputorOUTPUT_FILTER. Usage in public addons: none found except redaxo.org.Tested
Bulk move into a media category and moving back via the detail form, both in the backend.