mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 19:34:31 +02:00
Keep query parameters when adding locale part in RedirectController
This fixes issue #268
This commit is contained in:
parent
6e6e203f8a
commit
8351f38ee7
2 changed files with 11 additions and 6 deletions
|
@ -91,6 +91,9 @@ class RedirectControllerTest extends WebTestCase
|
|||
//Without an explicit set value, the user should be redirect to english version
|
||||
[null, '/', '/en/'],
|
||||
['en_US', '/part/3', '/en_US/part/3'],
|
||||
//Test that query parameters work
|
||||
['de', '/dialog?target_id=133&target_type=part', '/de/dialog?target_id=133&target_type=part'],
|
||||
['en', '/dialog?storelocation=1', '/en/dialog?storelocation=1'],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -99,13 +102,13 @@ class RedirectControllerTest extends WebTestCase
|
|||
*
|
||||
* @dataProvider urlAddLocaleDataProvider
|
||||
* @group slow
|
||||
* @depends testUrlMatch
|
||||
* @depends testUrlMatch
|
||||
*
|
||||
* @param $user_locale
|
||||
* @param $input_path
|
||||
* @param $redirect_path
|
||||
* @param string|null $user_locale
|
||||
* @param string $input_path
|
||||
* @param string $redirect_path
|
||||
*/
|
||||
public function testAddLocale($user_locale, $input_path, $redirect_path): void
|
||||
public function testAddLocale(?string $user_locale, string $input_path, string $redirect_path): void
|
||||
{
|
||||
//Redirect path is absolute
|
||||
$redirect_path = 'http://localhost'.$redirect_path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue