mirror of
https://github.com/nextcloud/server.git
synced 2026-04-20 22:00:39 -04:00
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:
parent
f033ef7c18
commit
cd3a88805b
1 changed files with 1 additions and 8 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue