Browse Source

Use proper URL generation function (#24576)

Fixes the redirection after login, otherwise `core/files/index` is opened which fails.
tags/v9.1.0beta1
Lukas Reschke 8 years ago
parent
commit
ee0ebd192a

+ 1
- 1
core/Controller/LoginController.php View File

return new RedirectResponse($location); return new RedirectResponse($location);
} }
} }
return new RedirectResponse($this->urlGenerator->linkTo('files', 'index'));
return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.index'));
} }


} }

+ 2
- 2
tests/core/controller/LoginControllerTest.php View File

->method('createSessionToken') ->method('createSessionToken')
->with($this->request, $user->getUID(), $password); ->with($this->request, $user->getUID(), $password);
$this->urlGenerator->expects($this->once()) $this->urlGenerator->expects($this->once())
->method('linkTo')
->with('files', 'index')
->method('linkToRoute')
->with('files.view.index')
->will($this->returnValue($indexPageUrl)); ->will($this->returnValue($indexPageUrl));


$expected = new \OCP\AppFramework\Http\RedirectResponse($indexPageUrl); $expected = new \OCP\AppFramework\Http\RedirectResponse($indexPageUrl);

Loading…
Cancel
Save