Uh oh!
There was an error while loading. Please reload this page.
Add LoadAdditionalScriptsEvent for files_sharing - #21815
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
MorrisJobke
commented
Jul 13, 2020
I just noticed that you still use the newer old way. The newest one is the |
MorrisJobke
commented
Jul 13, 2020
MorrisJobke
left a comment
There was a problem hiding this comment.
Code looks good and works 👍
16ce985 to
b329c95CompareMorrisJobke
commented
Jul 13, 2020
Rebased and autosquashed 🚀 |
b329c95 to
aa5e98aCompareMorrisJobke
commented
Jul 13, 2020
And I fixed the unit tests 🙈 |
ChristophWurst
left a comment
There was a problem hiding this comment.
A theoretical concern but it's easy to fix now than having another migration path for a public event that takes three years to get rid of.
Uh oh!
There was an error while loading. Please reload this page.
aa5e98a to
fb01f17Comparejuliusknorr
commented
Jul 14, 2020
Fixed, rebased and squashed. |
Uh oh!
There was an error while loading. Please reload this page.
MorrisJobke
left a comment
There was a problem hiding this comment.
Beside my little comment this looks good 👍
fb01f17 to
6c8ba1cCompareMorrisJobke
commented
Jul 15, 2020
Ready for merge 🚀 |
| // Load Viewer scripts | ||
| if (class_exists(LoadViewer::class)) { | ||
| $this->eventDispatcher->dispatch(LoadViewer::class, new LoadViewer()); | ||
| $this->eventDispatcher->dispatchTyped(new LoadViewer()); |
There was a problem hiding this comment.
Yep - that's the new way and makes things fully typed and thus allows the be a bit more safe.
There was a problem hiding this comment.
Also you just register for the ::class and then the IDE finds properly all usages ;)
Uh oh!
There was an error while loading. Please reload this page.
6c8ba1c to
1aff8d7CompareSigned-off-by: Julius Härtl <jus@bitgrid.net>
1aff8d7 to
217a69eCompare
Move old the
OCA\Files::loadAdditionalScriptsandOCA\Files::loadAdditionalScripts::publicShareAuthevents to our the public event API. An adapter is added as well to still dispatch the old events on the until the old ones are removed completely.Add to Critical changes for developers & admins for Nextcloud 20 #20953 if the old event is dropped