Skip to content

Commit

Permalink
fix: Remove legacy hacky workaround in OCA\WorkflowEngine\Listener
Browse files Browse the repository at this point in the history
It is not needed anymore since OCP\Util::addScript is used directly now,
 and not the function "script" from template functions.

Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Mar 3, 2025
1 parent 3f6da8f commit 960b2b5
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,18 @@
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\WorkflowEngine\Listener;

use OCA\WorkflowEngine\AppInfo\Application;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\Template;
use OCP\Util;
use OCP\WorkflowEngine\Events\LoadSettingsScriptsEvent;
use function class_exists;
use function function_exists;

/** @template-implements IEventListener<LoadSettingsScriptsEvent> */
class LoadAdditionalSettingsScriptsListener implements IEventListener {
public function handle(Event $event): void {
if (!function_exists('style')) {
// This is hacky, but we need to load the template class
class_exists(Template::class, true);
}

Util::addScript('core', 'files_fileinfo');
Util::addScript('core', 'files_client');
Util::addScript('core', 'systemtags');
Expand Down

0 comments on commit 960b2b5

Please sign in to comment.