aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Route/Route.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Route/Route.php')
-rw-r--r--lib/private/Route/Route.php39
1 files changed, 6 insertions, 33 deletions
diff --git a/lib/private/Route/Route.php b/lib/private/Route/Route.php
index ad440a001af..08231649e76 100644
--- a/lib/private/Route/Route.php
+++ b/lib/private/Route/Route.php
@@ -1,30 +1,9 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Bart Visscher <bartv@thisnet.nl>
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author David Prévot <taffit@debian.org>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Robin Appelman <robin@icewind.nl>
- * @author Robin McCorkell <robin@mccorkell.me.uk>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- * @author Thomas Tanghus <thomas@tanghus.net>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * 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, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OC\Route;
@@ -145,15 +124,9 @@ class Route extends SymfonyRoute implements IRoute {
* The action to execute when this route matches, includes a file like
* it is called directly
* @param string $file
- * @return void
*/
public function actionInclude($file) {
- $function = function ($param) use ($file) {
- unset($param["_route"]);
- $_GET = array_merge($_GET, $param);
- unset($param);
- require_once "$file";
- } ;
- $this->action($function);
+ $this->setDefault('file', $file);
+ return $this;
}
}