aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-02-13 19:40:23 +0100
committerGitHub <noreply@github.com>2024-02-13 19:40:23 +0100
commit8bcc55b5dafa6d8fb71afcce4c0b1eb6efce8c8b (patch)
treec969dcdf5d466aa149afeff2bd2e792a94cecd3b /apps
parent932d6e13efa232a8cbf675e70a9efafe74689945 (diff)
parent5e124c4a8acb1a4c883f654b5f7865204e7e8b7d (diff)
downloadnextcloud-server-8bcc55b5dafa6d8fb71afcce4c0b1eb6efce8c8b.tar.gz
nextcloud-server-8bcc55b5dafa6d8fb71afcce4c0b1eb6efce8c8b.zip
Merge pull request #43532 from nextcloud/chore/remove-dead-code
fix(files): Remove dead code from files controllers
Diffstat (limited to 'apps')
-rw-r--r--apps/files/lib/Controller/ViewController.php20
-rw-r--r--apps/files/tests/Controller/ViewControllerTest.php5
2 files changed, 2 insertions, 23 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php
index 5172194dd8b..e7398cc21c2 100644
--- a/apps/files/lib/Controller/ViewController.php
+++ b/apps/files/lib/Controller/ViewController.php
@@ -116,26 +116,6 @@ class ViewController extends Controller {
}
/**
- * @param string $appName
- * @param string $scriptName
- * @return string
- */
- protected function renderScript($appName, $scriptName) {
- $content = '';
- $appPath = \OC_App::getAppPath($appName);
- $scriptPath = $appPath . '/' . $scriptName;
- if (file_exists($scriptPath)) {
- // TODO: sanitize path / script name ?
- ob_start();
- include $scriptPath;
- $content = ob_get_contents();
- @ob_end_clean();
- }
-
- return $content;
- }
-
- /**
* FIXME: Replace with non static code
*
* @return array
diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php
index 588c93f8316..0b71011f60c 100644
--- a/apps/files/tests/Controller/ViewControllerTest.php
+++ b/apps/files/tests/Controller/ViewControllerTest.php
@@ -71,9 +71,9 @@ class ViewControllerTest extends TestCase {
private $eventDispatcher;
/** @var ViewController|\PHPUnit\Framework\MockObject\MockObject */
private $viewController;
- /** @var IUser */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */
private $user;
- /** @var IUserSession */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
/** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
private $appManager;
@@ -135,7 +135,6 @@ class ViewControllerTest extends TestCase {
])
->setMethods([
'getStorageInfo',
- 'renderScript'
])
->getMock();
}