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.
At present, it's difficult to do anything with the result of a FileSluggy rename. Only the old and new file names are passed to the FileSluggyOnUpdateFileName event whereas to have something work on the files, it'll also want the media source, upload directory and the other details stored in the $files variable.
This update adds those to the event trigger as well as adding a system-setting to allow the user to force the FileSluggyOnUpdateFileName event to be triggered with the original file upload information in the event that a rename wasn't actually required.
Doing it this way allows plugins to 'hitch their wagon' to the event REGARDLESS of whether a file rename took place. The alternative would be to trigger on both the FileSluggyOnUpdateFileName event AS WELL AS the OnFileManagerUpload event, knowing that one or the other was going to find its target file missing and be the wrong code to run.
Would require insertion of new 'nl' lexicon items - I've only added the English as it's all I know.