Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions apps/files/lib/Controller/ViewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,8 @@ public function index($dir = '', $view = '', $fileid = null, $fileNotFound = fal
}

$event = new LoadAdditionalScriptsEvent();
$this->eventDispatcher->dispatch(LoadAdditionalScriptsEvent::class, $event);

$this->eventDispatcher->dispatch(LoadSidebar::class, new LoadSidebar());
$this->eventDispatcher->dispatchTyped($event);
$this->eventDispatcher->dispatchTyped(new LoadSidebar());
// Load Viewer scripts
if (class_exists(LoadViewer::class)) {
$this->eventDispatcher->dispatchTyped(new LoadViewer());
Expand Down
3 changes: 2 additions & 1 deletion apps/workflowengine/lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
use OCP\EventDispatcher\IEventDispatcher;
use OCP\ILogger;
use OCP\IServerContainer;
use OCP\WorkflowEngine\Events\LoadSettingsScriptsEvent;
use OCP\WorkflowEngine\IEntity;
use OCP\WorkflowEngine\IEntityCompat;
use OCP\WorkflowEngine\IOperation;
Expand All @@ -51,7 +52,7 @@ public function __construct() {
public function register(IRegistrationContext $context): void {
$context->registerServiceAlias('RequestTimeController', RequestTime::class);
$context->registerEventListener(
'OCP\WorkflowEngine::loadAdditionalSettingScripts',
LoadSettingsScriptsEvent::class,
LoadAdditionalSettingsScriptsListener::class,
-100
);
Expand Down
2 changes: 2 additions & 0 deletions apps/workflowengine/lib/Settings/ASettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,12 @@ abstract public function getScope(): int;
* @return TemplateResponse
*/
public function getForm() {
// @deprecated in 20.0.0: retire this one in favor of the typed event
$this->eventDispatcher->dispatch(
'OCP\WorkflowEngine::loadAdditionalSettingScripts',
new LoadSettingsScriptsEvent()
);
$this->eventDispatcher->dispatchTyped(new LoadSettingsScriptsEvent());

$entities = $this->manager->getEntitiesList();
$this->initialStateService->provideInitialState(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function addDefaultPolicy(EmptyContentSecurityPolicy $policy) {
*/
public function getDefaultPolicy(): ContentSecurityPolicy {
$event = new AddContentSecurityPolicyEvent($this);
$this->dispatcher->dispatch(AddContentSecurityPolicyEvent::class, $event);
$this->dispatcher->dispatchTyped($event);

$defaultPolicy = new \OC\Security\CSP\ContentSecurityPolicy();
foreach ($this->policies as $policy) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function addDefaultPolicy(EmptyFeaturePolicy $policy): void {

public function getDefaultPolicy(): FeaturePolicy {
$event = new AddFeaturePolicyEvent($this);
$this->dispatcher->dispatch(AddFeaturePolicyEvent::class, $event);
$this->dispatcher->dispatchTyped($event);

$defaultPolicy = new FeaturePolicy();
foreach ($this->policies as $policy) {
Expand Down