fix: Remove legacy hacky workaround in OCA\WorkflowEngine\Listener

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 <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2025-03-03 12:33:00 +01:00 committed by Côme Chilliet
parent f033ef7c18
commit cd3a88805b

View file

@ -6,25 +6,18 @@ declare(strict_types=1);
* 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');