diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/lib/Controller/ViewController.php | 5 | ||||
-rw-r--r-- | apps/user_ldap/lib/Command/ShowConfig.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/lib/Command/ShowRemnants.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/lib/Group_LDAP.php | 10 | ||||
-rw-r--r-- | apps/workflowengine/lib/AppInfo/Application.php | 3 | ||||
-rw-r--r-- | apps/workflowengine/lib/Settings/ASettings.php | 2 |
6 files changed, 13 insertions, 11 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index 73ee589fdbc..1568e0c9f54 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -278,9 +278,8 @@ class ViewController extends Controller { } $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()); diff --git a/apps/user_ldap/lib/Command/ShowConfig.php b/apps/user_ldap/lib/Command/ShowConfig.php index 80af5718dcb..65d6f5165a7 100644 --- a/apps/user_ldap/lib/Command/ShowConfig.php +++ b/apps/user_ldap/lib/Command/ShowConfig.php @@ -108,7 +108,7 @@ class ShowConfig extends Command { $rows[] = [$key, $value]; } $table->setRows($rows); - $table->render($output); + $table->render(); } } } diff --git a/apps/user_ldap/lib/Command/ShowRemnants.php b/apps/user_ldap/lib/Command/ShowRemnants.php index 4722bf76ce1..c5e7c5321f3 100644 --- a/apps/user_ldap/lib/Command/ShowRemnants.php +++ b/apps/user_ldap/lib/Command/ShowRemnants.php @@ -101,7 +101,7 @@ class ShowRemnants extends Command { $output->writeln(json_encode($rows)); } else { $table->setRows($rows); - $table->render($output); + $table->render(); } return 0; } diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php index 199865e7623..6bf1bd31ba0 100644 --- a/apps/user_ldap/lib/Group_LDAP.php +++ b/apps/user_ldap/lib/Group_LDAP.php @@ -877,8 +877,8 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I ]) ]); $ldap_users = $this->access->fetchListOfUsers($filter, $attrs, 1); - if (count($ldap_users) < 1) { - continue; + if (empty($ldap_users)) { + break; } $groupUsers[] = $this->access->dn2username($ldap_users[0]['dn'][0]); break; @@ -886,13 +886,13 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I //we got DNs, check if we need to filter by search or we can give back all of them $uid = $this->access->dn2username($member); if (!$uid) { - continue; + break; } $cacheKey = 'userExistsOnLDAP' . $uid; $userExists = $this->access->connection->getFromCache($cacheKey); if ($userExists === false) { - continue; + break; } if ($userExists === null || $search !== '') { if (!$this->access->readAttribute($member, @@ -904,7 +904,7 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I if ($search === '') { $this->access->connection->writeToCache($cacheKey, false); } - continue; + break; } $this->access->connection->writeToCache($cacheKey, true); } diff --git a/apps/workflowengine/lib/AppInfo/Application.php b/apps/workflowengine/lib/AppInfo/Application.php index ddac4a74e28..8f762f0d707 100644 --- a/apps/workflowengine/lib/AppInfo/Application.php +++ b/apps/workflowengine/lib/AppInfo/Application.php @@ -36,6 +36,7 @@ use OCP\EventDispatcher\Event; 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; @@ -51,7 +52,7 @@ class Application extends App implements IBootstrap { public function register(IRegistrationContext $context): void { $context->registerServiceAlias('RequestTimeController', RequestTime::class); $context->registerEventListener( - 'OCP\WorkflowEngine::loadAdditionalSettingScripts', + LoadSettingsScriptsEvent::class, LoadAdditionalSettingsScriptsListener::class, -100 ); diff --git a/apps/workflowengine/lib/Settings/ASettings.php b/apps/workflowengine/lib/Settings/ASettings.php index 3d704e662ee..4d0d4312f16 100644 --- a/apps/workflowengine/lib/Settings/ASettings.php +++ b/apps/workflowengine/lib/Settings/ASettings.php @@ -82,10 +82,12 @@ abstract class ASettings implements ISettings { * @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( |