aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-07-27 23:08:15 +0200
committerJoas Schilling <coding@schilljs.com>2023-07-28 14:11:21 +0200
commitc5dcf3c849639c4f54d6cd903b31be9b1cefe71e (patch)
treea0fbe0762cda8993e9aa3e2608050ae013e2c955 /apps/files_sharing/lib
parent0c5d0c2127d570768453eeb8799b01aecb455228 (diff)
downloadnextcloud-server-c5dcf3c849639c4f54d6cd903b31be9b1cefe71e.tar.gz
nextcloud-server-c5dcf3c849639c4f54d6cd903b31be9b1cefe71e.zip
fix!: Remove LegacyBeforeTemplateRenderedListener from files_sharing
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/AppInfo/Application.php2
-rw-r--r--apps/files_sharing/lib/Listener/LegacyBeforeTemplateRenderedListener.php57
2 files changed, 0 insertions, 59 deletions
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php
index 8f5fe7aca5b..d89419b8ea9 100644
--- a/apps/files_sharing/lib/AppInfo/Application.php
+++ b/apps/files_sharing/lib/AppInfo/Application.php
@@ -37,7 +37,6 @@ use OCA\Files_Sharing\Event\BeforeTemplateRenderedEvent;
use OCA\Files_Sharing\External\Manager;
use OCA\Files_Sharing\External\MountProvider as ExternalMountProvider;
use OCA\Files_Sharing\Helper;
-use OCA\Files_Sharing\Listener\LegacyBeforeTemplateRenderedListener;
use OCA\Files_Sharing\Listener\LoadAdditionalListener;
use OCA\Files_Sharing\Listener\LoadSidebarListener;
use OCA\Files_Sharing\Listener\ShareInteractionListener;
@@ -133,7 +132,6 @@ class Application extends App implements IBootstrap {
public function registerEventsScripts(IEventDispatcher $dispatcher): void {
// sidebar and files scripts
$dispatcher->addServiceListener(LoadAdditionalScriptsEvent::class, LoadAdditionalListener::class);
- $dispatcher->addServiceListener(BeforeTemplateRenderedEvent::class, LegacyBeforeTemplateRenderedListener::class);
$dispatcher->addServiceListener(LoadSidebar::class, LoadSidebarListener::class);
$dispatcher->addServiceListener(ShareCreatedEvent::class, ShareInteractionListener::class);
$dispatcher->addServiceListener(ShareCreatedEvent::class, UserShareAcceptanceListener::class);
diff --git a/apps/files_sharing/lib/Listener/LegacyBeforeTemplateRenderedListener.php b/apps/files_sharing/lib/Listener/LegacyBeforeTemplateRenderedListener.php
deleted file mode 100644
index e7e81c3a17a..00000000000
--- a/apps/files_sharing/lib/Listener/LegacyBeforeTemplateRenderedListener.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/**
- * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-namespace OCA\Files_Sharing\Listener;
-
-use OC\EventDispatcher\SymfonyAdapter;
-use OCA\Files_Sharing\Event\BeforeTemplateRenderedEvent;
-use OCP\EventDispatcher\Event;
-use OCP\EventDispatcher\IEventListener;
-use Symfony\Component\EventDispatcher\GenericEvent;
-
-class LegacyBeforeTemplateRenderedListener implements IEventListener {
-
- /** @var SymfonyAdapter */
- private $dispatcher;
-
- public function __construct(SymfonyAdapter $dispatcher) {
- $this->dispatcher = $dispatcher;
- }
-
- public function handle(Event $event): void {
- if (!($event instanceof BeforeTemplateRenderedEvent)) {
- return;
- }
-
- $eventName = 'OCA\Files_Sharing::loadAdditionalScripts';
-
- if ($event->getScope() !== null) {
- $eventName .= '::' . $event->getScope();
- }
-
- $legacyEvent = new GenericEvent(null, ['share' => $event->getShare()]);
- $this->dispatcher->dispatch($eventName, $legacyEvent);
- }
-}