@@ -39,7 +39,7 @@ |
||
39 | 39 | public function fetch() |
40 | 40 | { |
41 | 41 | if (isset($this->_data) && $this->_data) { |
42 | - foreach ($this->_data as $value) {$this->add(new XHtmlOption($value));} |
|
42 | + foreach ($this->_data as $value) {$this->add(new XHtmlOption($value)); } |
|
43 | 43 | } |
44 | 44 | return parent::fetch(); |
45 | 45 | } |
@@ -104,12 +104,12 @@ discard block |
||
104 | 104 | $container['requestobj'] = $container['request']; |
105 | 105 | $container['responseobj'] = $container['response']; |
106 | 106 | |
107 | -$container['utils'] = function ($c) { |
|
107 | +$container['utils'] = function($c) { |
|
108 | 108 | $utils = new \PHPPgAdmin\ContainerUtils($c); |
109 | 109 | return $utils; |
110 | 110 | }; |
111 | 111 | |
112 | -$container['conf'] = function ($c) use ($conf) { |
|
112 | +$container['conf'] = function($c) use ($conf) { |
|
113 | 113 | |
114 | 114 | //\Kint::dump($conf); |
115 | 115 | // Plugins are removed |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | return $conf; |
119 | 119 | }; |
120 | 120 | |
121 | -$container['lang'] = function ($c) { |
|
121 | +$container['lang'] = function($c) { |
|
122 | 122 | include_once BASE_PATH . '/src/translations.php'; |
123 | 123 | |
124 | 124 | $c['appLangFiles'] = $appLangFiles; |
@@ -128,12 +128,12 @@ discard block |
||
128 | 128 | return $lang; |
129 | 129 | }; |
130 | 130 | |
131 | -$container['plugin_manager'] = function ($c) { |
|
131 | +$container['plugin_manager'] = function($c) { |
|
132 | 132 | $plugin_manager = new \PHPPgAdmin\PluginManager($c); |
133 | 133 | return $plugin_manager; |
134 | 134 | }; |
135 | 135 | |
136 | -$container['serializer'] = function ($c) { |
|
136 | +$container['serializer'] = function($c) { |
|
137 | 137 | $serializerbuilder = \JMS\Serializer\SerializerBuilder::create(); |
138 | 138 | $serializer = $serializerbuilder |
139 | 139 | ->setCacheDir(BASE_PATH . '/temp/jms') |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | }; |
144 | 144 | |
145 | 145 | // Create Misc class references |
146 | -$container['misc'] = function ($c) { |
|
146 | +$container['misc'] = function($c) { |
|
147 | 147 | |
148 | 148 | $misc = new \PHPPgAdmin\Misc($c); |
149 | 149 | |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | }; |
247 | 247 | |
248 | 248 | // Register Twig View helper |
249 | -$container['view'] = function ($c) { |
|
249 | +$container['view'] = function($c) { |
|
250 | 250 | |
251 | 251 | $conf = $c->get('conf'); |
252 | 252 | $misc = $c->misc; |
@@ -283,8 +283,8 @@ discard block |
||
283 | 283 | return $view; |
284 | 284 | }; |
285 | 285 | |
286 | -$container['haltHandler'] = function ($c) { |
|
287 | - return function ($request, $response, $exits, $status = 500) use ($c) { |
|
286 | +$container['haltHandler'] = function($c) { |
|
287 | + return function($request, $response, $exits, $status = 500) use ($c) { |
|
288 | 288 | |
289 | 289 | $title = 'PHPPgAdmin Error'; |
290 | 290 | |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | |
316 | 316 | // Set the requestobj and responseobj properties of the container |
317 | 317 | // as the value of $request and $response, which already contain the route |
318 | -$app->add(function ($request, $response, $next) { |
|
318 | +$app->add(function($request, $response, $next) { |
|
319 | 319 | |
320 | 320 | $this['requestobj'] = $request; |
321 | 321 | $this['responseobj'] = $response; |
@@ -92,7 +92,7 @@ |
||
92 | 92 | $lang = $this->lang; |
93 | 93 | $data = $misc->getDatabaseAccessor(); |
94 | 94 | |
95 | - $attPre = function (&$rowdata) use ($data) { |
|
95 | + $attPre = function(&$rowdata) use ($data) { |
|
96 | 96 | $rowdata->fields['+type'] = $data->formatType($rowdata->fields['type'], $rowdata->fields['atttypmod']); |
97 | 97 | }; |
98 | 98 |
@@ -92,7 +92,7 @@ |
||
92 | 92 | $lang = $this->lang; |
93 | 93 | $data = $misc->getDatabaseAccessor(); |
94 | 94 | |
95 | - $attPre = function (&$rowdata) use ($data) { |
|
95 | + $attPre = function(&$rowdata) use ($data) { |
|
96 | 96 | $rowdata->fields['+type'] = $data->formatType($rowdata->fields['type'], $rowdata->fields['atttypmod']); |
97 | 97 | }; |
98 | 98 |
@@ -212,7 +212,7 @@ |
||
212 | 212 | $status = -1; // ini |
213 | 213 | if ($rs->recordCount() and ($rs->fields['vacrelid'] == $toid)) { |
214 | 214 | // table exists in pg_autovacuum, UPDATE |
215 | - $sql = sprintf("UPDATE \"pg_catalog\".\"pg_autovacuum\" SET |
|
215 | + $sql = sprintf("UPDATE \"pg_catalog\".\"pg_autovacuum\" SET |
|
216 | 216 | enabled = '%s', |
217 | 217 | vac_base_thresh = %s, |
218 | 218 | vac_scale_factor = %s, |
@@ -5,7 +5,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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(); |