Passed
Pull Request — master (#70)
by Felipe
03:51
created
src/controllers/LoginController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             $login_html .= $this->printMsg($msg, false);
80 80
         }
81 81
 
82
-        $login_html .= '<form id="login_form"  method="post" name="login_form" action="'.SUBFOLDER.'/redirect/server?server='.htmlspecialchars($server_id).'">';
82
+        $login_html .= '<form id="login_form"  method="post" name="login_form" action="' . SUBFOLDER . '/redirect/server?server=' . htmlspecialchars($server_id) . '">';
83 83
 
84 84
         $md5_server = md5($server_id);
85 85
         // Pass request vars through form (is this a security risk???)
@@ -91,33 +91,33 @@  discard block
 block discarded – undo
91 91
                 $key = explode('?', $key)[1];
92 92
             }
93 93
 
94
-            $login_html .= '<input type="hidden" name="'.htmlspecialchars($key).'" value="'.htmlspecialchars($val).'" />'."\n";
94
+            $login_html .= '<input type="hidden" name="' . htmlspecialchars($key) . '" value="' . htmlspecialchars($val) . '" />' . "\n";
95 95
         }
96 96
 
97
-        $login_html .= '<input type="hidden" name="loginServer" value="'.htmlspecialchars($server_id).'" />';
97
+        $login_html .= '<input type="hidden" name="loginServer" value="' . htmlspecialchars($server_id) . '" />';
98 98
         $login_html .= '<table class="navbar" border="0" cellpadding="5" cellspacing="3">';
99 99
         $login_html .= '<tr>';
100
-        $login_html .= '<td>'.$lang['strusername'].'</td>';
100
+        $login_html .= '<td>' . $lang['strusername'] . '</td>';
101 101
         $loginusername = isset($_POST['loginUsername']) ? htmlspecialchars($_POST['loginUsername']) : '';
102 102
 
103
-        $login_html .= '<td><input type="text" name="loginUsername" value="'.$loginusername.'" size="24" /></td>';
103
+        $login_html .= '<td><input type="text" name="loginUsername" value="' . $loginusername . '" size="24" /></td>';
104 104
         $login_html .= '</tr>';
105 105
         $login_html .= '<tr>';
106
-        $login_html .= '<td>'.$lang['strpassword'].'</td>';
107
-        $login_html .= '<td><input id="loginPassword" type="password" name="loginPassword_'.$md5_server.'" size="24" /></td>';
106
+        $login_html .= '<td>' . $lang['strpassword'] . '</td>';
107
+        $login_html .= '<td><input id="loginPassword" type="password" name="loginPassword_' . $md5_server . '" size="24" /></td>';
108 108
         $login_html .= '</tr>';
109 109
         $login_html .= '</table>';
110 110
         if (count($conf['servers']) > 1) {
111 111
             $checked = isset($_POST['loginShared']) ? 'checked="checked"' : '';
112
-            $login_html .= '<p><input type="checkbox" id="loginShared" name="loginShared" '.$checked.' />';
113
-            $login_html .= '<label for="loginShared">'.$lang['strtrycred'].'</label></p>';
112
+            $login_html .= '<p><input type="checkbox" id="loginShared" name="loginShared" ' . $checked . ' />';
113
+            $login_html .= '<label for="loginShared">' . $lang['strtrycred'] . '</label></p>';
114 114
         }
115
-        $login_html .= '<p><input type="submit" name="loginSubmit" value="'.$lang['strlogin'].'" /></p>';
115
+        $login_html .= '<p><input type="submit" name="loginSubmit" value="' . $lang['strlogin'] . '" /></p>';
116 116
         $login_html .= '</form>';
117 117
 
118 118
         $login_html .= '<script type="text/javascript">';
119 119
         $login_html .= '	var uname = document.login_form.loginUsername;';
120
-        $login_html .= '	var pword = document.login_form.loginPassword_'.$md5_server.';';
120
+        $login_html .= '	var pword = document.login_form.loginPassword_' . $md5_server . ';';
121 121
         $login_html .= '	if (uname.value == "") {';
122 122
         $login_html .= '		uname.focus();';
123 123
         $login_html .= '	} else {';
Please login to merge, or discard this patch.
src/controllers/IndexesController.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
             return $this->doTree();
23 23
         }
24 24
 
25
-        $this->printHeader($lang['strindexes'], '<script src="'.SUBFOLDER.'/js/indexes.js" type="text/javascript"></script>');
25
+        $this->printHeader($lang['strindexes'], '<script src="' . SUBFOLDER . '/js/indexes.js" type="text/javascript"></script>');
26 26
 
27 27
         if ($action == 'create_index' || $action == 'save_create_index') {
28 28
             echo '<body onload="init();">';
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $lang = $this->lang;
83 83
         $data = $misc->getDatabaseAccessor();
84 84
 
85
-        $indPre = function (&$rowdata, $actions) use ($data, $lang) {
85
+        $indPre = function(&$rowdata, $actions) use ($data, $lang) {
86 86
             if ($data->phpBool($rowdata->fields['indisprimary'])) {
87 87
                 $rowdata->fields['+constraints'] = $lang['strprimarykey'];
88 88
                 $actions['drop']['disable'] = true;
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
         $reqvars = $misc->getRequestVars($subject);
220 220
 
221
-        $getIcon = function ($f) {
221
+        $getIcon = function($f) {
222 222
             if ($f['indisprimary'] == 't') {
223 223
                 return 'PrimaryKey';
224 224
             }
@@ -255,25 +255,25 @@  discard block
 block discarded – undo
255 255
             $this->printTrail('index');
256 256
             $this->printTitle($lang['strclusterindex'], 'pg.index.cluster');
257 257
 
258
-            echo '<p>', sprintf($lang['strconfcluster'], $misc->printVal($_REQUEST['index'])), '</p>'."\n";
258
+            echo '<p>', sprintf($lang['strconfcluster'], $misc->printVal($_REQUEST['index'])), '</p>' . "\n";
259 259
 
260
-            echo '<form action="'.SUBFOLDER.'/src/views/indexes.php" method="post">'."\n";
260
+            echo '<form action="' . SUBFOLDER . '/src/views/indexes.php" method="post">' . "\n";
261 261
             echo '<p><input type="checkbox" id="analyze" name="analyze"', (isset($_REQUEST['analyze']) ? ' checked="checked"' : ''), ' />';
262
-            echo "<label for=\"analyze\">{$lang['stranalyze']}</label></p>"."\n";
263
-            echo '<input type="hidden" name="action" value="cluster_index" />'."\n";
264
-            echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['table']), '" />'."\n";
265
-            echo '<input type="hidden" name="index" value="', htmlspecialchars($_REQUEST['index']), '" />'."\n";
262
+            echo "<label for=\"analyze\">{$lang['stranalyze']}</label></p>" . "\n";
263
+            echo '<input type="hidden" name="action" value="cluster_index" />' . "\n";
264
+            echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['table']), '" />' . "\n";
265
+            echo '<input type="hidden" name="index" value="', htmlspecialchars($_REQUEST['index']), '" />' . "\n";
266 266
             echo $misc->form;
267
-            echo "<input type=\"submit\" name=\"cluster\" value=\"{$lang['strclusterindex']}\" />"."\n";
268
-            echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />"."\n";
269
-            echo '</form>'."\n";
267
+            echo "<input type=\"submit\" name=\"cluster\" value=\"{$lang['strclusterindex']}\" />" . "\n";
268
+            echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />" . "\n";
269
+            echo '</form>' . "\n";
270 270
         } else {
271 271
             $status = $data->clusterIndex($_POST['table'], $_POST['index']);
272 272
             if ($status == 0) {
273 273
                 if (isset($_POST['analyze'])) {
274 274
                     $status = $data->analyzeDB($_POST['table']);
275 275
                     if ($status == 0) {
276
-                        $this->doDefault($lang['strclusteredgood'].' '.$lang['stranalyzegood']);
276
+                        $this->doDefault($lang['strclusteredgood'] . ' ' . $lang['stranalyzegood']);
277 277
                     } else {
278 278
                         $this->doDefault($lang['stranalyzebad']);
279 279
                     }
@@ -368,54 +368,54 @@  discard block
 block discarded – undo
368 368
         $buttonRemove->set_attribute('onclick', 'buttonPressed(this);');
369 369
         $buttonRemove->set_attribute('type', 'button');
370 370
 
371
-        echo '<form onsubmit="doSelectAll();" name="formIndex" action="indexes.php" method="post">'."\n";
371
+        echo '<form onsubmit="doSelectAll();" name="formIndex" action="indexes.php" method="post">' . "\n";
372 372
 
373
-        echo '<table>'."\n";
374
-        echo '<tr><th class="data required" colspan="3">'.$lang['strindexname'].'</th></tr>';
373
+        echo '<table>' . "\n";
374
+        echo '<tr><th class="data required" colspan="3">' . $lang['strindexname'] . '</th></tr>';
375 375
         echo '<tr>';
376 376
         echo '<td class="data1" colspan="3">';
377
-        echo '<input type="text" name="formIndexName" size="32" maxlength="'.$data->_maxNameLen.'" value="'.htmlspecialchars($_POST['formIndexName']).'" />';
377
+        echo '<input type="text" name="formIndexName" size="32" maxlength="' . $data->_maxNameLen . '" value="' . htmlspecialchars($_POST['formIndexName']) . '" />';
378 378
         echo '</td></tr>';
379
-        echo '<tr><th class="data">'.$lang['strtablecolumnlist'].'</th><th class="data">&nbsp;</th>';
380
-        echo '<th class="data required">'.$lang['strindexcolumnlist'].'</th></tr>'."\n";
381
-        echo '<tr><td class="data1">'.$selColumns->fetch().'</td>'."\n";
382
-        echo '<td class="data1">'.$buttonRemove->fetch().$buttonAdd->fetch().'</td>';
383
-        echo '<td class="data1">'.$selIndex->fetch().'</td></tr>'."\n";
384
-        echo '</table>'."\n";
385
-
386
-        echo '<table> '."\n";
379
+        echo '<tr><th class="data">' . $lang['strtablecolumnlist'] . '</th><th class="data">&nbsp;</th>';
380
+        echo '<th class="data required">' . $lang['strindexcolumnlist'] . '</th></tr>' . "\n";
381
+        echo '<tr><td class="data1">' . $selColumns->fetch() . '</td>' . "\n";
382
+        echo '<td class="data1">' . $buttonRemove->fetch() . $buttonAdd->fetch() . '</td>';
383
+        echo '<td class="data1">' . $selIndex->fetch() . '</td></tr>' . "\n";
384
+        echo '</table>' . "\n";
385
+
386
+        echo '<table> ' . "\n";
387 387
         echo '<tr>';
388
-        echo '<th class="data left required" scope="row">'.$lang['strindextype'].'</th>';
388
+        echo '<th class="data left required" scope="row">' . $lang['strindextype'] . '</th>';
389 389
         echo '<td class="data1"><select name="formIndexType">';
390 390
         foreach ($data->typIndexes as $v) {
391 391
             echo '<option value="', htmlspecialchars($v), '"',
392
-            ($v == $_POST['formIndexType']) ? ' selected="selected"' : '', '>', htmlspecialchars($v), '</option>'."\n";
392
+            ($v == $_POST['formIndexType']) ? ' selected="selected"' : '', '>', htmlspecialchars($v), '</option>' . "\n";
393 393
         }
394
-        echo '</select></td></tr>'."\n";
394
+        echo '</select></td></tr>' . "\n";
395 395
         echo '<tr>';
396 396
         echo "<th class=\"data left\" scope=\"row\"><label for=\"formUnique\">{$lang['strunique']}</label></th>";
397 397
         echo '<td class="data1"><input type="checkbox" id="formUnique" name="formUnique"', (isset($_POST['formUnique']) ? 'checked="checked"' : ''), ' /></td>';
398 398
         echo '</tr>';
399 399
         echo '<tr>';
400 400
         echo "<th class=\"data left\" scope=\"row\">{$lang['strwhere']}</th>";
401
-        echo '<td class="data1">(<input name="formWhere" size="32" maxlength="'.$data->_maxNameLen.'" value="'.htmlspecialchars($_POST['formWhere']).'" />)</td>';
401
+        echo '<td class="data1">(<input name="formWhere" size="32" maxlength="' . $data->_maxNameLen . '" value="' . htmlspecialchars($_POST['formWhere']) . '" />)</td>';
402 402
         echo '</tr>';
403 403
 
404 404
         // Tablespace (if there are any)
405 405
         if ($data->hasTablespaces() && $tablespaces->recordCount() > 0) {
406
-            echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strtablespace']}</th>"."\n";
407
-            echo "\t\t<td class=\"data1\">\n\t\t\t<select name=\"formSpc\">"."\n";
406
+            echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strtablespace']}</th>" . "\n";
407
+            echo "\t\t<td class=\"data1\">\n\t\t\t<select name=\"formSpc\">" . "\n";
408 408
             // Always offer the default (empty) option
409 409
             echo "\t\t\t\t<option value=\"\"",
410
-            ($_POST['formSpc'] == '') ? ' selected="selected"' : '', '></option>'."\n";
410
+            ($_POST['formSpc'] == '') ? ' selected="selected"' : '', '></option>' . "\n";
411 411
             // Display all other tablespaces
412 412
             while (!$tablespaces->EOF) {
413 413
                 $spcname = htmlspecialchars($tablespaces->fields['spcname']);
414 414
                 echo "\t\t\t\t<option value=\"{$spcname}\"",
415
-                ($spcname == $_POST['formSpc']) ? ' selected="selected"' : '', ">{$spcname}</option>"."\n";
415
+                ($spcname == $_POST['formSpc']) ? ' selected="selected"' : '', ">{$spcname}</option>" . "\n";
416 416
                 $tablespaces->moveNext();
417 417
             }
418
-            echo "\t\t\t</select>\n\t\t</td>\n\t</tr>"."\n";
418
+            echo "\t\t\t</select>\n\t\t</td>\n\t</tr>" . "\n";
419 419
         }
420 420
 
421 421
         if ($data->hasConcurrentIndexBuild()) {
@@ -427,13 +427,13 @@  discard block
 block discarded – undo
427 427
 
428 428
         echo '</table>';
429 429
 
430
-        echo '<p><input type="hidden" name="action" value="save_create_index" />'."\n";
430
+        echo '<p><input type="hidden" name="action" value="save_create_index" />' . "\n";
431 431
         echo $misc->form;
432
-        echo '<input type="hidden" name="subject" value="', htmlspecialchars($subject), '" />'."\n";
433
-        echo '<input type="hidden" name="'.$subject.'" value="', htmlspecialchars($object), '" />'."\n";
434
-        echo "<input type=\"submit\" value=\"{$lang['strcreate']}\" />"."\n";
435
-        echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>"."\n";
436
-        echo '</form>'."\n";
432
+        echo '<input type="hidden" name="subject" value="', htmlspecialchars($subject), '" />' . "\n";
433
+        echo '<input type="hidden" name="' . $subject . '" value="', htmlspecialchars($object), '" />' . "\n";
434
+        echo "<input type=\"submit\" value=\"{$lang['strcreate']}\" />" . "\n";
435
+        echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>" . "\n";
436
+        echo '</form>' . "\n";
437 437
     }
438 438
 
439 439
     /**
@@ -501,17 +501,17 @@  discard block
 block discarded – undo
501 501
             $this->printTrail('index');
502 502
             $this->printTitle($lang['strdrop'], 'pg.index.drop');
503 503
 
504
-            echo '<p>', sprintf($lang['strconfdropindex'], $misc->printVal($_REQUEST['index'])), '</p>'."\n";
504
+            echo '<p>', sprintf($lang['strconfdropindex'], $misc->printVal($_REQUEST['index'])), '</p>' . "\n";
505 505
 
506
-            echo '<form action="'.SUBFOLDER.'/src/views/indexes.php" method="post">'."\n";
507
-            echo '<input type="hidden" name="action" value="drop_index" />'."\n";
508
-            echo '<input type="hidden" name="table" value="', htmlspecialchars($object), '" />'."\n";
509
-            echo '<input type="hidden" name="index" value="', htmlspecialchars($_REQUEST['index']), '" />'."\n";
506
+            echo '<form action="' . SUBFOLDER . '/src/views/indexes.php" method="post">' . "\n";
507
+            echo '<input type="hidden" name="action" value="drop_index" />' . "\n";
508
+            echo '<input type="hidden" name="table" value="', htmlspecialchars($object), '" />' . "\n";
509
+            echo '<input type="hidden" name="index" value="', htmlspecialchars($_REQUEST['index']), '" />' . "\n";
510 510
             echo $misc->form;
511
-            echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$lang['strcascade']}</label></p>"."\n";
512
-            echo "<input type=\"submit\" name=\"drop\" value=\"{$lang['strdrop']}\" />"."\n";
513
-            echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />"."\n";
514
-            echo '</form>'."\n";
511
+            echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$lang['strcascade']}</label></p>" . "\n";
512
+            echo "<input type=\"submit\" name=\"drop\" value=\"{$lang['strdrop']}\" />" . "\n";
513
+            echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />" . "\n";
514
+            echo '</form>' . "\n";
515 515
         } else {
516 516
             $status = $data->dropIndex($_POST['index'], isset($_POST['cascade']));
517 517
             if ($status == 0) {
Please login to merge, or discard this patch.
src/controllers/TablespacesController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
                 $_POST['comment'] = ($data->hasSharedComments()) ? $tablespace->fields['spccomment'] : '';
191 191
             }
192 192
 
193
-            echo '<form action="'.SUBFOLDER."/src/views/tablespaces.php\" method=\"post\">\n";
193
+            echo '<form action="' . SUBFOLDER . "/src/views/tablespaces.php\" method=\"post\">\n";
194 194
             echo $misc->form;
195 195
             echo "<table>\n";
196 196
             echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n";
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 
268 268
             echo '<p>', sprintf($lang['strconfdroptablespace'], $misc->printVal($_REQUEST['tablespace'])), "</p>\n";
269 269
 
270
-            echo '<form action="'.SUBFOLDER."/src/views/tablespaces.php\" method=\"post\">\n";
270
+            echo '<form action="' . SUBFOLDER . "/src/views/tablespaces.php\" method=\"post\">\n";
271 271
             echo $misc->form;
272 272
             echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
273 273
             echo '<input type="hidden" name="tablespace" value="', htmlspecialchars($_REQUEST['tablespace']), "\" />\n";
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
         $this->printTitle($lang['strcreatetablespace'], 'pg.tablespace.create');
320 320
         $this->printMsg($msg);
321 321
 
322
-        echo '<form action="'.SUBFOLDER."/src/views/tablespaces.php\" method=\"post\">\n";
322
+        echo '<form action="' . SUBFOLDER . "/src/views/tablespaces.php\" method=\"post\">\n";
323 323
         echo $misc->form;
324 324
         echo "<table>\n";
325 325
         echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n";
Please login to merge, or discard this patch.
src/controllers/DataimportController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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';
Please login to merge, or discard this patch.
src/controllers/RulesController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         }
24 24
 
25 25
         // Different header if we're view rules or table rules
26
-        $this->printHeader($_REQUEST[$_REQUEST['subject']].' - '.$lang['strrules']);
26
+        $this->printHeader($_REQUEST[$_REQUEST['subject']] . ' - ' . $lang['strrules']);
27 27
         $this->printBody();
28 28
 
29 29
         switch ($action) {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
             $this->printTitle($lang['strcreaterule'], 'pg.rule.create');
183 183
             $this->printMsg($msg);
184 184
 
185
-            echo '<form action="'.SUBFOLDER."/src/views/rules.php\" method=\"post\">\n";
185
+            echo '<form action="' . SUBFOLDER . "/src/views/rules.php\" method=\"post\">\n";
186 186
             echo "<table>\n";
187 187
             echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n";
188 188
             echo "<td class=\"data1\"><input name=\"name\" size=\"16\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
             echo '<p>', sprintf($lang['strconfdroprule'], $misc->printVal($_REQUEST['rule']),
251 251
                 $misc->printVal($_REQUEST[$_REQUEST['reltype']])), "</p>\n";
252 252
 
253
-            echo '<form action="'.SUBFOLDER."/src/views/rules.php\" method=\"post\">\n";
253
+            echo '<form action="' . SUBFOLDER . "/src/views/rules.php\" method=\"post\">\n";
254 254
             echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
255 255
             echo '<input type="hidden" name="subject" value="', htmlspecialchars($_REQUEST['reltype']), "\" />\n";
256 256
             echo '<input type="hidden" name="', htmlspecialchars($_REQUEST['reltype']),
Please login to merge, or discard this patch.
src/controllers/OperatorsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -251,7 +251,7 @@
 block discarded – undo
251 251
 
252 252
             echo '<p>', sprintf($lang['strconfdropoperator'], $misc->printVal($_REQUEST['operator'])), "</p>\n";
253 253
 
254
-            echo '<form action="'.SUBFOLDER."/src/views/operators.php\" method=\"post\">\n";
254
+            echo '<form action="' . SUBFOLDER . "/src/views/operators.php\" method=\"post\">\n";
255 255
             echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$lang['strcascade']}</label></p>\n";
256 256
             echo "<p><input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
257 257
             echo '<input type="hidden" name="operator" value="', htmlspecialchars($_REQUEST['operator']), "\" />\n";
Please login to merge, or discard this patch.
src/controllers/ConstraintsController.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
             return $this->doTree();
23 23
         }
24 24
 
25
-        $this->printHeader($lang['strtables'].' - '.$_REQUEST['table'].' - '.$lang['strconstraints'],
26
-            '<script src="'.SUBFOLDER.'/js/indexes.js" type="text/javascript"></script>', true, 'header_select2.twig');
25
+        $this->printHeader($lang['strtables'] . ' - ' . $_REQUEST['table'] . ' - ' . $lang['strconstraints'],
26
+            '<script src="' . SUBFOLDER . '/js/indexes.js" type="text/javascript"></script>', true, 'header_select2.twig');
27 27
 
28 28
         if ($action == 'add_unique_key' || $action == 'save_add_unique_key'
29 29
             || $action == 'add_primary_key' || $action == 'save_add_primary_key'
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
         $lang = $this->lang;
114 114
         $data = $misc->getDatabaseAccessor();
115 115
 
116
-        $cnPre = function (&$rowdata) use ($data) {
116
+        $cnPre = function(&$rowdata) use ($data) {
117 117
             if (is_null($rowdata->fields['consrc'])) {
118 118
                 $atts = $data->getAttributeNames($_REQUEST['table'], explode(' ', $rowdata->fields['indkey']));
119
-                $rowdata->fields['+definition'] = ($rowdata->fields['contype'] == 'u' ? 'UNIQUE (' : 'PRIMARY KEY (').implode(',', $atts).')';
119
+                $rowdata->fields['+definition'] = ($rowdata->fields['contype'] == 'u' ? 'UNIQUE (' : 'PRIMARY KEY (') . implode(',', $atts) . ')';
120 120
             } else {
121 121
                 $rowdata->fields['+definition'] = $rowdata->fields['consrc'];
122 122
             }
@@ -319,9 +319,9 @@  discard block
 block discarded – undo
319 319
                     echo "<table>\n";
320 320
                     echo "<tr><th class=\"data\" colspan=\"3\">{$lang['strfktarget']}</th></tr>";
321 321
                     echo "<tr><th class=\"data\">{$lang['strtablecolumnlist']}</th><th class=\"data\">&nbsp;</th><th class=data>{$lang['strfkcolumnlist']}</th></tr>\n";
322
-                    echo '<tr><td class="data1">'.$selColumns->fetch()."</td>\n";
323
-                    echo '<td class="data1" style="text-align: center">'.$buttonRemove->fetch().$buttonAdd->fetch().'</td>';
324
-                    echo '<td class="data1">'.$selIndex->fetch()."</td></tr>\n";
322
+                    echo '<tr><td class="data1">' . $selColumns->fetch() . "</td>\n";
323
+                    echo '<td class="data1" style="text-align: center">' . $buttonRemove->fetch() . $buttonAdd->fetch() . '</td>';
324
+                    echo '<td class="data1">' . $selIndex->fetch() . "</td></tr>\n";
325 325
                     echo "<tr><th class=\"data\" colspan=\"3\">{$lang['stractions']}</th></tr>";
326 326
                     echo '<tr>';
327 327
                     echo "<td class=\"data1\" colspan=\"3\">\n";
@@ -438,9 +438,9 @@  discard block
 block discarded – undo
438 438
                 echo "<tr><th class=\"data\" colspan=\"3\">{$lang['strname']}</th></tr>\n";
439 439
                 echo "<tr><td class=\"data1\" colspan=\"3\"><input type=\"text\" name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" /></td></tr>\n";
440 440
                 echo "<tr><th class=\"data\">{$lang['strtablecolumnlist']}</th><th class=\"data\">&nbsp;</th><th class=\"data required\">{$lang['strfkcolumnlist']}</th></tr>\n";
441
-                echo '<tr><td class="data1">'.$selColumns->fetch()."</td>\n";
442
-                echo '<td class="data1" style="text-align: center">'.$buttonRemove->fetch().$buttonAdd->fetch()."</td>\n";
443
-                echo '<td class=data1>'.$selIndex->fetch()."</td></tr>\n";
441
+                echo '<tr><td class="data1">' . $selColumns->fetch() . "</td>\n";
442
+                echo '<td class="data1" style="text-align: center">' . $buttonRemove->fetch() . $buttonAdd->fetch() . "</td>\n";
443
+                echo '<td class=data1>' . $selIndex->fetch() . "</td></tr>\n";
444 444
                 echo "<tr><th class=\"data\" colspan=\"3\">{$lang['strfktarget']}</th></tr>";
445 445
                 echo '<tr>';
446 446
                 echo '<td class="data1" colspan="3"><select class="select2" name="target">';
@@ -546,9 +546,9 @@  discard block
 block discarded – undo
546 546
             echo '<td class="data1" colspan="3"><input type="text" name="name" value="', htmlspecialchars($_POST['name']),
547 547
                 "\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" /></td></tr>";
548 548
             echo "<tr><th class=\"data\">{$lang['strtablecolumnlist']}</th><th class=\"data\">&nbsp;</th><th class=\"data required\">{$lang['strindexcolumnlist']}</th></tr>\n";
549
-            echo '<tr><td class="data1">'.$selColumns->fetch()."</td>\n";
550
-            echo '<td class="data1" style="text-align: center">'.$buttonRemove->fetch().$buttonAdd->fetch().'</td>';
551
-            echo '<td class=data1>'.$selIndex->fetch()."</td></tr>\n";
549
+            echo '<tr><td class="data1">' . $selColumns->fetch() . "</td>\n";
550
+            echo '<td class="data1" style="text-align: center">' . $buttonRemove->fetch() . $buttonAdd->fetch() . '</td>';
551
+            echo '<td class=data1>' . $selIndex->fetch() . "</td></tr>\n";
552 552
 
553 553
             // Tablespace (if there are any)
554 554
             if ($data->hasTablespaces() && $tablespaces->recordCount() > 0) {
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
             $this->printTitle($lang['straddcheck'], 'pg.constraint.check');
638 638
             $this->printMsg($msg);
639 639
 
640
-            echo '<form action="'.SUBFOLDER."/src/views/constraints.php\" method=\"post\">\n";
640
+            echo '<form action="' . SUBFOLDER . "/src/views/constraints.php\" method=\"post\">\n";
641 641
             echo "<table>\n";
642 642
             echo "<tr><th class=\"data\">{$lang['strname']}</th>\n";
643 643
             echo "<th class=\"data required\">{$lang['strdefinition']}</th></tr>\n";
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
             echo '<p>', sprintf($lang['strconfdropconstraint'], $misc->printVal($_REQUEST['constraint']),
688 688
                 $misc->printVal($_REQUEST['table'])), "</p>\n";
689 689
 
690
-            echo '<form action="'.SUBFOLDER."/src/views/constraints.php\" method=\"post\">\n";
690
+            echo '<form action="' . SUBFOLDER . "/src/views/constraints.php\" method=\"post\">\n";
691 691
             echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
692 692
             echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['table']), "\" />\n";
693 693
             echo '<input type="hidden" name="constraint" value="', htmlspecialchars($_REQUEST['constraint']), "\" />\n";
Please login to merge, or discard this patch.
src/controllers/ServersController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             'server'   => [
92 92
                 'title' => $lang['strserver'],
93 93
                 'field' => Decorator::field('desc'),
94
-                'url'   => SUBFOLDER.'/redirect/server?',
94
+                'url'   => SUBFOLDER . '/redirect/server?',
95 95
                 'vars'  => ['server' => 'id'],
96 96
             ],
97 97
             'host'     => [
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             ],
127 127
         ];
128 128
 
129
-        $svPre = function (&$rowdata) use ($actions) {
129
+        $svPre = function(&$rowdata) use ($actions) {
130 130
             $actions['logout']['disable'] = empty($rowdata->fields['username']);
131 131
 
132 132
             return $actions;
Please login to merge, or discard this patch.
src/controllers/RolesController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
         $lang = $this->lang;
91 91
         $data = $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
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             'role'       => [
109 109
                 'title' => $lang['strrole'],
110 110
                 'field' => Decorator::field('rolname'),
111
-                'url'   => SUBFOLDER."/redirect/role?action=properties&amp;{$misc->href}&amp;",
111
+                'url'   => SUBFOLDER . "/redirect/role?action=properties&amp;{$misc->href}&amp;",
112 112
                 'vars'  => ['rolename' => 'rolname'],
113 113
             ],
114 114
             'superuser'  => [
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
         $this->printTitle($lang['strcreaterole'], 'pg.role.create');
246 246
         $this->printMsg($msg);
247 247
 
248
-        echo '<form action="'.SUBFOLDER."/src/views/roles.php\" method=\"post\">\n";
248
+        echo '<form action="' . SUBFOLDER . "/src/views/roles.php\" method=\"post\">\n";
249 249
         echo "<table>\n";
250 250
         echo "\t<tr>\n\t\t<th class=\"data left required\" style=\"width: 130px\">{$lang['strname']}</th>\n";
251 251
         echo "\t\t<td class=\"data1\"><input size=\"15\" maxlength=\"{$data->_maxNameLen}\" name=\"formRolename\" value=\"", htmlspecialchars($_POST['formRolename']), "\" /></td>\n\t</tr>\n";
@@ -417,10 +417,10 @@  discard block
 block discarded – undo
417 417
                 $_POST['formPassword'] = '';
418 418
             }
419 419
 
420
-            echo '<form action="'.SUBFOLDER."/src/views/roles.php\" method=\"post\">\n";
420
+            echo '<form action="' . SUBFOLDER . "/src/views/roles.php\" method=\"post\">\n";
421 421
             echo "<table>\n";
422 422
             echo "\t<tr>\n\t\t<th class=\"data left\" style=\"width: 130px\">{$lang['strname']}</th>\n";
423
-            echo "\t\t<td class=\"data1\">", ($canRename ? "<input name=\"formNewRoleName\" size=\"15\" maxlength=\"{$data->_maxNameLen}\" value=\"".htmlspecialchars($_POST['formNewRoleName']).'" />' : $misc->printVal($roledata->fields['rolname'])), "</td>\n\t</tr>\n";
423
+            echo "\t\t<td class=\"data1\">", ($canRename ? "<input name=\"formNewRoleName\" size=\"15\" maxlength=\"{$data->_maxNameLen}\" value=\"" . htmlspecialchars($_POST['formNewRoleName']) . '" />' : $misc->printVal($roledata->fields['rolname'])), "</td>\n\t</tr>\n";
424 424
             echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strpassword']}</th>\n";
425 425
             echo "\t\t<td class=\"data1\"><input type=\"password\" size=\"15\" name=\"formPassword\" value=\"", htmlspecialchars($_POST['formPassword']), "\" /></td>\n\t</tr>\n";
426 426
             echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strconfirm']}</th>\n";
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
 
603 603
             echo '<p>', sprintf($lang['strconfdroprole'], $misc->printVal($_REQUEST['rolename'])), "</p>\n";
604 604
 
605
-            echo '<form action="'.SUBFOLDER."/src/views/roles.php\" method=\"post\">\n";
605
+            echo '<form action="' . SUBFOLDER . "/src/views/roles.php\" method=\"post\">\n";
606 606
             echo "<p><input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
607 607
             echo '<input type="hidden" name="rolename" value="', htmlspecialchars($_REQUEST['rolename']), "\" />\n";
608 608
             echo $misc->form;
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
                 $_POST['confirm'] = '';
831 831
             }
832 832
 
833
-            echo '<form action="'.SUBFOLDER."/src/views/roles.php\" method=\"post\">\n";
833
+            echo '<form action="' . SUBFOLDER . "/src/views/roles.php\" method=\"post\">\n";
834 834
             echo "<table>\n";
835 835
             echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strpassword']}</th>\n";
836 836
             echo "\t\t<td><input type=\"password\" name=\"password\" size=\"32\" value=\"",
Please login to merge, or discard this patch.