@@ 5-12 (lines=8) @@ | ||
2 | ||
3 | namespace TechWilk\Rota; |
|
4 | ||
5 | function legacyRouteAddUser($request, $response, $args) |
|
6 | { |
|
7 | if (!empty($args['action']) && $args['action'] == 'edit') { |
|
8 | return $response->withStatus(308)->withHeader('Location', $this->router->pathFor('user-me')); |
|
9 | } |
|
10 | ||
11 | return $response->withStatus(308)->withHeader('Location', $this->router->pathFor('user-new')); |
|
12 | } |
|
13 | ||
14 | $app->get('/old/addUser.php', 'legacyRouteAddUser'); |
|
15 | $app->get('/addUser.php', 'legacyRouteAddUser'); |
|
@@ 33-40 (lines=8) @@ | ||
30 | $app->get('/old/calendarTokens.php', 'legacyRouteAddTokens'); |
|
31 | $app->get('/calendarTokens.php', 'legacyRouteAddTokens'); |
|
32 | ||
33 | function legacyRoutePassword($request, $response, $args) |
|
34 | { |
|
35 | if (!empty($args['id'])) { |
|
36 | return $response->withStatus(308)->withHeader('Location', $this->router->pathFor('user-password')); |
|
37 | } |
|
38 | ||
39 | return $response->withStatus(308)->withHeader('Location', $this->router->pathFor('user-me')); |
|
40 | } |
|
41 | ||
42 | $app->get('/old/editPassword.php', 'legacyRoutePassword'); |
|
43 | $app->get('/editPassword.php', 'legacyRoutePassword'); |