summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-05-11 19:39:57 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-05-11 19:39:57 +0200
commitee0ebd192a394e4f9d4c9dd2c78b1b4d6a211c7a (patch)
tree85a2792f6c0fd961994fc27d7db4d9a7e2ee0d77
parent2a05035339901e630fccae90639985c00d6803e9 (diff)
downloadnextcloud-server-ee0ebd192a394e4f9d4c9dd2c78b1b4d6a211c7a.tar.gz
nextcloud-server-ee0ebd192a394e4f9d4c9dd2c78b1b4d6a211c7a.zip
Use proper URL generation function (#24576)
Fixes the redirection after login, otherwise `core/files/index` is opened which fails.
-rw-r--r--core/Controller/LoginController.php2
-rw-r--r--tests/core/controller/LoginControllerTest.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php
index 6985e2be87e..36044731377 100644
--- a/core/Controller/LoginController.php
+++ b/core/Controller/LoginController.php
@@ -194,7 +194,7 @@ class LoginController extends Controller {
return new RedirectResponse($location);
}
}
- return new RedirectResponse($this->urlGenerator->linkTo('files', 'index'));
+ return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.index'));
}
}
diff --git a/tests/core/controller/LoginControllerTest.php b/tests/core/controller/LoginControllerTest.php
index 0b5a143f4e3..139d48ad7da 100644
--- a/tests/core/controller/LoginControllerTest.php
+++ b/tests/core/controller/LoginControllerTest.php
@@ -299,8 +299,8 @@ class LoginControllerTest extends TestCase {
->method('createSessionToken')
->with($this->request, $user->getUID(), $password);
$this->urlGenerator->expects($this->once())
- ->method('linkTo')
- ->with('files', 'index')
+ ->method('linkToRoute')
+ ->with('files.view.index')
->will($this->returnValue($indexPageUrl));
$expected = new \OCP\AppFramework\Http\RedirectResponse($indexPageUrl);