|
@@ -5,7 +5,7 @@ discard block |
|
|
block discarded – undo |
|
5
|
5
|
*/ |
|
6
|
6
|
require_once './src/lib.inc.php'; |
|
7
|
7
|
|
|
8
|
|
-$app->post('/redirect[/{subject}]', function ($request, $response, $args) { |
|
|
8
|
+$app->post('/redirect[/{subject}]', function($request, $response, $args) { |
|
9
|
9
|
|
|
10
|
10
|
$body = $response->getBody(); |
|
11
|
11
|
$query_string = $request->getUri()->getQuery(); |
|
@@ -55,7 +55,7 @@ discard block |
|
|
block discarded – undo |
|
55
|
55
|
|
|
56
|
56
|
}); |
|
57
|
57
|
|
|
58
|
|
-$app->get('/redirect[/{subject}]', function ($request, $response, $args) { |
|
|
58
|
+$app->get('/redirect[/{subject}]', function($request, $response, $args) { |
|
59
|
59
|
|
|
60
|
60
|
$subject = (isset($args['subject'])) ? $args['subject'] : 'root'; |
|
61
|
61
|
$destinationurl = $this->utils->getDestinationWithLastTab($subject); |
|
@@ -63,31 +63,31 @@ discard block |
|
|
block discarded – undo |
|
63
|
63
|
|
|
64
|
64
|
}); |
|
65
|
65
|
|
|
66
|
|
-$app->get('/src/views/browser', function ($request, $response, $args) { |
|
|
66
|
+$app->get('/src/views/browser', function($request, $response, $args) { |
|
67
|
67
|
|
|
68
|
68
|
$controller = new \PHPPgAdmin\Controller\BrowserController($this, true); |
|
69
|
69
|
return $controller->render(); |
|
70
|
70
|
}); |
|
71
|
71
|
|
|
72
|
|
-$app->get('/src/views/login', function ($request, $response, $args) { |
|
|
72
|
+$app->get('/src/views/login', function($request, $response, $args) { |
|
73
|
73
|
|
|
74
|
74
|
$controller = new \PHPPgAdmin\Controller\LoginController($this, true); |
|
75
|
75
|
return $controller->render(); |
|
76
|
76
|
}); |
|
77
|
77
|
|
|
78
|
|
-$app->get('/src/views/servers', function ($request, $response, $args) { |
|
|
78
|
+$app->get('/src/views/servers', function($request, $response, $args) { |
|
79
|
79
|
|
|
80
|
80
|
$controller = new \PHPPgAdmin\Controller\ServersController($this, true); |
|
81
|
81
|
return $controller->render(); |
|
82
|
82
|
}); |
|
83
|
83
|
|
|
84
|
|
-$app->get('/src/views/intro', function ($request, $response, $args) { |
|
|
84
|
+$app->get('/src/views/intro', function($request, $response, $args) { |
|
85
|
85
|
|
|
86
|
86
|
$controller = new \PHPPgAdmin\Controller\IntroController($this, true); |
|
87
|
87
|
return $controller->render(); |
|
88
|
88
|
}); |
|
89
|
89
|
|
|
90
|
|
-$app->map(['GET', 'POST'], '/src/views/{subject}', function ($request, $response, $args) { |
|
|
90
|
+$app->map(['GET', 'POST'], '/src/views/{subject}', function($request, $response, $args) { |
|
91
|
91
|
|
|
92
|
92
|
if ($this->misc->getServerId() === null) { |
|
93
|
93
|
return $response->withStatus(302)->withHeader('Location', SUBFOLDER . '/src/views/servers'); |
|
@@ -106,7 +106,7 @@ discard block |
|
|
block discarded – undo |
|
106
|
106
|
return $controller->render(); |
|
107
|
107
|
}); |
|
108
|
108
|
|
|
109
|
|
-$app->get('/[{subject}]', function ($request, $response, $args) { |
|
|
109
|
+$app->get('/[{subject}]', function($request, $response, $args) { |
|
110
|
110
|
|
|
111
|
111
|
$subject = (isset($args['subject'])) ? $args['subject'] : 'intro'; |
|
112
|
112
|
$_server_info = $this->misc->getServerInfo(); |