@@ -638,7 +638,7 @@ |
||
638 | 638 | echo '<p>' . (($defaults['autovacuum'] == 'on') ? $lang['strturnedon'] : $lang['strturnedoff']) . '</p>'; |
639 | 639 | echo "<p class=\"message\">{$lang['strnotdefaultinred']}</p>"; |
640 | 640 | |
641 | - $enlight = function ($f, $p) { |
|
641 | + $enlight = function($f, $p) { |
|
642 | 642 | if (isset($f[$p[0]]) and ($f[$p[0]] != $p[1])) { |
643 | 643 | return '<span style="color:#F33;font-weight:bold">' . htmlspecialchars($f[$p[0]]) . '</span>'; |
644 | 644 | } |
@@ -121,7 +121,7 @@ |
||
121 | 121 | * This is a callback function to display the result of each separate query |
122 | 122 | * @param ADORecordSet $rs The recordset returned by the script execetor |
123 | 123 | */ |
124 | - $sqlCallback = function ($query, $rs, $lineno) use ($data, $misc, $lang, $_connection) { |
|
124 | + $sqlCallback = function($query, $rs, $lineno) use ($data, $misc, $lang, $_connection) { |
|
125 | 125 | |
126 | 126 | // Check if $rs is false, if so then there was a fatal error |
127 | 127 | if ($rs === false) { |
@@ -127,7 +127,7 @@ |
||
127 | 127 | ], |
128 | 128 | ]; |
129 | 129 | |
130 | - $svPre = function (&$rowdata) use ($actions) { |
|
130 | + $svPre = function(&$rowdata) use ($actions) { |
|
131 | 131 | $actions['logout']['disable'] = empty($rowdata->fields['username']); |
132 | 132 | return $actions; |
133 | 133 | }; |
@@ -248,7 +248,7 @@ |
||
248 | 248 | $this->printTitle($lang['strproperties'], 'pg.type'); |
249 | 249 | $this->printMsg($msg); |
250 | 250 | |
251 | - $attPre = function (&$rowdata) use ($data) { |
|
251 | + $attPre = function(&$rowdata) use ($data) { |
|
252 | 252 | $rowdata->fields['+type'] = $data->formatType($rowdata->fields['type'], $rowdata->fields['atttypmod']); |
253 | 253 | }; |
254 | 254 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * @param $parser |
37 | 37 | * @param $cdata |
38 | 38 | */ |
39 | - $_charHandler = function ($parser, $cdata) use (&$state, &$curr_col_val) { |
|
39 | + $_charHandler = function($parser, $cdata) use (&$state, &$curr_col_val) { |
|
40 | 40 | if ($state == 'COLUMN') { |
41 | 41 | $curr_col_val .= $cdata; |
42 | 42 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | * @param $name |
50 | 50 | * @param $attrs |
51 | 51 | */ |
52 | - $_startElement = function ($parser, $name, $attrs) use ($data, $misc, &$state, &$curr_col_name, &$curr_col_null) { |
|
52 | + $_startElement = function($parser, $name, $attrs) use ($data, $misc, &$state, &$curr_col_name, &$curr_col_null) { |
|
53 | 53 | switch ($name) { |
54 | 54 | case 'DATA': |
55 | 55 | if ($state != 'XML') { |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | * @param $parser |
113 | 113 | * @param $name |
114 | 114 | */ |
115 | - $_endElement = function ($parser, $name) use ($data, $misc, &$state, &$curr_col_name, &$curr_col_null, &$curr_col_val) { |
|
115 | + $_endElement = function($parser, $name) use ($data, $misc, &$state, &$curr_col_name, &$curr_col_null, &$curr_col_val) { |
|
116 | 116 | switch ($name) { |
117 | 117 | case 'DATA': |
118 | 118 | $state = 'READ_DATA'; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $lang = $this->lang; |
99 | 99 | $data = $misc->getDatabaseAccessor(); |
100 | 100 | |
101 | - $attPre = function (&$rowdata, $actions) use ($data) { |
|
101 | + $attPre = function(&$rowdata, $actions) use ($data) { |
|
102 | 102 | $rowdata->fields['+type'] = $data->formatType($rowdata->fields['type'], $rowdata->fields['atttypmod']); |
103 | 103 | $attname = $rowdata->fields['attname']; |
104 | 104 | $table = $_REQUEST['table']; |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | return $actions; |
112 | 112 | }; |
113 | 113 | |
114 | - $cstrRender = function ($s, $p) use ($misc, $data) { |
|
114 | + $cstrRender = function($s, $p) use ($misc, $data) { |
|
115 | 115 | $str = ''; |
116 | 116 | foreach ($p['keys'] as $k => $c) { |
117 | 117 | if (is_null($p['keys'][$k]['consrc'])) { |
@@ -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 | $this->misc = new \PHPPgAdmin\Misc($c); |
148 | 148 | |
149 | 149 | $conf = $c->get('conf'); |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | }; |
242 | 242 | |
243 | 243 | // Register Twig View helper |
244 | -$container['view'] = function ($c) { |
|
244 | +$container['view'] = function($c) { |
|
245 | 245 | $conf = $c->get('conf'); |
246 | 246 | $this->misc = $c->misc; |
247 | 247 | |
@@ -277,8 +277,8 @@ discard block |
||
277 | 277 | return $view; |
278 | 278 | }; |
279 | 279 | |
280 | -$container['haltHandler'] = function ($c) { |
|
281 | - return function ($request, $response, $exits, $status = 500) use ($c) { |
|
280 | +$container['haltHandler'] = function($c) { |
|
281 | + return function($request, $response, $exits, $status = 500) use ($c) { |
|
282 | 282 | $title = 'PHPPgAdmin Error'; |
283 | 283 | |
284 | 284 | $html = '<p>The application could not run because of the following error:</p>'; |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | |
309 | 309 | // Set the requestobj and responseobj properties of the container |
310 | 310 | // as the value of $request and $response, which already contain the route |
311 | -$app->add(function ($request, $response, $next) { |
|
311 | +$app->add(function($request, $response, $next) { |
|
312 | 312 | $this['requestobj'] = $request; |
313 | 313 | $this['responseobj'] = $response; |
314 | 314 |
@@ -90,11 +90,11 @@ |
||
90 | 90 | $lang = $this->lang; |
91 | 91 | $data = $this->misc->getDatabaseAccessor(); |
92 | 92 | |
93 | - $renderRoleConnLimit = function ($val) use ($lang) { |
|
93 | + $renderRoleConnLimit = function($val) use ($lang) { |
|
94 | 94 | return $val == '-1' ? $lang['strnolimit'] : htmlspecialchars($val); |
95 | 95 | }; |
96 | 96 | |
97 | - $renderRoleExpires = function ($val) use ($lang) { |
|
97 | + $renderRoleExpires = function($val) use ($lang) { |
|
98 | 98 | return $val == 'infinity' ? $lang['strnever'] : htmlspecialchars($val); |
99 | 99 | }; |
100 | 100 |
@@ -63,7 +63,7 @@ |
||
63 | 63 | $lang = $this->lang; |
64 | 64 | $data = $this->misc->getDatabaseAccessor(); |
65 | 65 | |
66 | - $attPre = function (&$rowdata) use ($data) { |
|
66 | + $attPre = function(&$rowdata) use ($data) { |
|
67 | 67 | $rowdata->fields['+type'] = $data->formatType($rowdata->fields['type'], $rowdata->fields['atttypmod']); |
68 | 68 | }; |
69 | 69 |