Passed
Pull Request — master (#70)
by Felipe
03:51
created
src/controllers/DisplayController.php 1 patch
Spacing   +89 added lines, -89 removed lines patch added patch discarded remove patch
@@ -25,13 +25,13 @@  discard block
 block discarded – undo
25 25
 
26 26
         set_time_limit(0);
27 27
 
28
-        $scripts = '<script src="'.SUBFOLDER.'/js/display.js" type="text/javascript"></script>';
28
+        $scripts = '<script src="' . SUBFOLDER . '/js/display.js" type="text/javascript"></script>';
29 29
 
30
-        $scripts .= '<script type="text/javascript">'."\n";
30
+        $scripts .= '<script type="text/javascript">' . "\n";
31 31
         $scripts .= "var Display = {\n";
32
-        $scripts .= "errmsg: '".str_replace("'", "\'", $lang['strconnectionfail'])."'\n";
32
+        $scripts .= "errmsg: '" . str_replace("'", "\'", $lang['strconnectionfail']) . "'\n";
33 33
         $scripts .= "};\n";
34
-        $scripts .= '</script>'."\n";
34
+        $scripts .= '</script>' . "\n";
35 35
 
36 36
         $footer_template = 'footer.twig';
37 37
         $header_template = 'header.twig';
@@ -75,13 +75,13 @@  discard block
 block discarded – undo
75 75
         // Set the title based on the subject of the request
76 76
         if (isset($_REQUEST['subject']) && isset($_REQUEST[$_REQUEST['subject']])) {
77 77
             if ($_REQUEST['subject'] == 'table') {
78
-                $this->printHeader($lang['strtables'].': '.$_REQUEST[$_REQUEST['subject']], $scripts, true, $header_template);
78
+                $this->printHeader($lang['strtables'] . ': ' . $_REQUEST[$_REQUEST['subject']], $scripts, true, $header_template);
79 79
             } elseif ($_REQUEST['subject'] == 'view') {
80
-                $this->printHeader($lang['strviews'].': '.$_REQUEST[$_REQUEST['subject']], $scripts, true, $header_template);
80
+                $this->printHeader($lang['strviews'] . ': ' . $_REQUEST[$_REQUEST['subject']], $scripts, true, $header_template);
81 81
             } elseif ($_REQUEST['subject'] == 'matview') {
82
-                $this->printHeader('M'.$lang['strviews'].': '.$_REQUEST[$_REQUEST['subject']], $scripts, true, $header_template);
82
+                $this->printHeader('M' . $lang['strviews'] . ': ' . $_REQUEST[$_REQUEST['subject']], $scripts, true, $header_template);
83 83
             } elseif ($_REQUEST['subject'] == 'column') {
84
-                $this->printHeader($lang['strcolumn'].': '.$_REQUEST[$_REQUEST['subject']], $scripts, true, $header_template);
84
+                $this->printHeader($lang['strcolumn'] . ': ' . $_REQUEST[$_REQUEST['subject']], $scripts, true, $header_template);
85 85
             }
86 86
         } else {
87 87
             $this->printHeader($lang['strqueryresults'], $scripts, true, $header_template);
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
         $this->prtrace($query);
268 268
         //die(htmlspecialchars($query));
269 269
 
270
-        echo '<form method="post" id="sqlform" action="'.$_SERVER['REQUEST_URI'].'">';
270
+        echo '<form method="post" id="sqlform" action="' . $_SERVER['REQUEST_URI'] . '">';
271 271
         echo '<textarea width="90%" name="query"  id="query" rows="5" cols="100" resizable="true">';
272 272
 
273 273
         echo htmlspecialchars($query);
@@ -340,19 +340,19 @@  discard block
 block discarded – undo
340 340
             // Display edit and delete actions if we have a key
341 341
             $colspan = count($buttons);
342 342
             if ($colspan > 0 and count($key) > 0) {
343
-                echo "<th colspan=\"{$colspan}\" class=\"data\">{$lang['stractions']}</th>"."\n";
343
+                echo "<th colspan=\"{$colspan}\" class=\"data\">{$lang['stractions']}</th>" . "\n";
344 344
             }
345 345
 
346 346
             /* we show OIDs only if we are in TABLE or SELECT type browsing */
347 347
             $this->printTableHeaderCells($rs, $_gets, isset($object));
348 348
 
349
-            echo '</tr>'."\n";
349
+            echo '</tr>' . "\n";
350 350
 
351 351
             $i = 0;
352 352
             reset($rs->fields);
353 353
             while (!$rs->EOF) {
354 354
                 $id = (($i % 2) == 0 ? '1' : '2');
355
-                echo "<tr class=\"data{$id}\">"."\n";
355
+                echo "<tr class=\"data{$id}\">" . "\n";
356 356
                 // Display edit and delete links if we have a key
357 357
                 if ($colspan > 0 and count($key) > 0) {
358 358
                     $keys_array = [];
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
                         $keys_array["key[{$v}]"] = $rs->fields[$v];
366 366
                     }
367 367
                     if ($has_nulls) {
368
-                        echo "<td colspan=\"{$colspan}\">&nbsp;</td>"."\n";
368
+                        echo "<td colspan=\"{$colspan}\">&nbsp;</td>" . "\n";
369 369
                     } else {
370 370
                         if (isset($actions['actionbuttons']['edit'])) {
371 371
                             $actions['actionbuttons']['edit'] = $edit_params;
@@ -386,24 +386,24 @@  discard block
 block discarded – undo
386 386
                         foreach ($actions['actionbuttons'] as $action) {
387 387
                             echo "<td class=\"opbutton{$id}\">";
388 388
                             $this->printLink($action, true, __METHOD__);
389
-                            echo '</td>'."\n";
389
+                            echo '</td>' . "\n";
390 390
                         }
391 391
                     }
392 392
                 }
393 393
 
394 394
                 $this->printTableRowCells($rs, $fkey_information, isset($object));
395 395
 
396
-                echo '</tr>'."\n";
396
+                echo '</tr>' . "\n";
397 397
                 $rs->moveNext();
398 398
                 $i++;
399 399
             }
400
-            echo '</table>'."\n";
400
+            echo '</table>' . "\n";
401 401
 
402
-            echo '<p>', $rs->recordCount(), " {$lang['strrows']}</p>"."\n";
402
+            echo '<p>', $rs->recordCount(), " {$lang['strrows']}</p>" . "\n";
403 403
             // Show page navigation
404 404
             $misc->printPages($_REQUEST['page'], $max_pages, $_gets);
405 405
         } else {
406
-            echo "<p>{$lang['strnodata']}</p>"."\n";
406
+            echo "<p>{$lang['strnodata']}</p>" . "\n";
407 407
         }
408 408
 
409 409
         // Navigation links
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
                 $fksprops = false;
586 586
             }
587 587
 
588
-            echo '<form action="'.SUBFOLDER.'/src/views/display.php" method="post" id="ac_form">'."\n";
588
+            echo '<form action="' . SUBFOLDER . '/src/views/display.php" method="post" id="ac_form">' . "\n";
589 589
 
590 590
             /*echo '<p>';
591 591
             if (!$error) {
@@ -599,11 +599,11 @@  discard block
 block discarded – undo
599 599
             $elements = 0;
600 600
             $error = true;
601 601
             if ($rs->recordCount() == 1 && $attrs->recordCount() > 0) {
602
-                echo '<table>'."\n";
602
+                echo '<table>' . "\n";
603 603
 
604 604
                 // Output table header
605 605
                 echo "<tr><th class=\"data\">{$lang['strcolumn']}</th><th class=\"data\">{$lang['strtype']}</th>";
606
-                echo "<th class=\"data\">{$lang['strformat']}</th>"."\n";
606
+                echo "<th class=\"data\">{$lang['strformat']}</th>" . "\n";
607 607
                 echo "<th class=\"data\">{$lang['strnull']}</th><th class=\"data\">{$lang['strvalue']}</th></tr>";
608 608
 
609 609
                 $i = 0;
@@ -616,19 +616,19 @@  discard block
 block discarded – undo
616 616
                         $_REQUEST['format'][$attrs->fields['attname']] = 'VALUE';
617 617
                     }
618 618
 
619
-                    echo "<tr class=\"data{$id}\">"."\n";
619
+                    echo "<tr class=\"data{$id}\">" . "\n";
620 620
                     echo '<td style="white-space:nowrap;">', $misc->printVal($attrs->fields['attname']), '</td>';
621
-                    echo '<td style="white-space:nowrap;">'."\n";
621
+                    echo '<td style="white-space:nowrap;">' . "\n";
622 622
                     echo $misc->printVal($data->formatType($attrs->fields['type'], $attrs->fields['atttypmod']));
623 623
                     echo '<input type="hidden" name="types[', htmlspecialchars($attrs->fields['attname']), ']" value="',
624 624
                     htmlspecialchars($attrs->fields['type']), '" /></td>';
625 625
                     $elements++;
626
-                    echo '<td style="white-space:nowrap;">'."\n";
627
-                    echo '<select name="format['.htmlspecialchars($attrs->fields['attname']), ']">'."\n";
628
-                    echo '<option value="VALUE"', ($_REQUEST['format'][$attrs->fields['attname']] == 'VALUE') ? ' selected="selected"' : '', ">{$lang['strvalue']}</option>"."\n";
626
+                    echo '<td style="white-space:nowrap;">' . "\n";
627
+                    echo '<select name="format[' . htmlspecialchars($attrs->fields['attname']), ']">' . "\n";
628
+                    echo '<option value="VALUE"', ($_REQUEST['format'][$attrs->fields['attname']] == 'VALUE') ? ' selected="selected"' : '', ">{$lang['strvalue']}</option>" . "\n";
629 629
                     $selected = ($_REQUEST['format'][$attrs->fields['attname']] == 'EXPRESSION') ? ' selected="selected"' : '';
630
-                    echo '<option value="EXPRESSION"'.$selected.">{$lang['strexpression']}</option>"."\n";
631
-                    echo "</select>\n</td>"."\n";
630
+                    echo '<option value="EXPRESSION"' . $selected . ">{$lang['strexpression']}</option>" . "\n";
631
+                    echo "</select>\n</td>" . "\n";
632 632
                     $elements++;
633 633
                     echo '<td style="white-space:nowrap;">';
634 634
                     // Output null box if the column allows nulls (doesn't look at CHECKs or ASSERTIONS)
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
                             $_REQUEST['nulls'][$attrs->fields['attname']] = 'on';
639 639
                         }
640 640
                         echo "<label><span><input type=\"checkbox\" name=\"nulls[{$attrs->fields['attname']}]\"",
641
-                        isset($_REQUEST['nulls'][$attrs->fields['attname']]) ? ' checked="checked"' : '', ' /></span></label></td>'."\n";
641
+                        isset($_REQUEST['nulls'][$attrs->fields['attname']]) ? ' checked="checked"' : '', ' /></span></label></td>' . "\n";
642 642
                         $elements++;
643 643
                     } else {
644 644
                         echo '&nbsp;</td>';
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
                     // keep track of which element offset we're up to.  We can't refer to the null checkbox by name
654 654
                     // as it contains '[' and ']' characters.
655 655
                     if (!$attrs->fields['attnotnull']) {
656
-                        $extras['onChange'] = 'elements['.($elements - 1).'].checked = false;';
656
+                        $extras['onChange'] = 'elements[' . ($elements - 1) . '].checked = false;';
657 657
                     }
658 658
 
659 659
                     if (($fksprops !== false) && isset($fksprops['byfield'][$attrs->fields['attnum']])) {
@@ -665,63 +665,63 @@  discard block
 block discarded – undo
665 665
 
666 666
                     echo '</td>';
667 667
                     $elements++;
668
-                    echo '</tr>'."\n";
668
+                    echo '</tr>' . "\n";
669 669
                     $i++;
670 670
                     $attrs->moveNext();
671 671
                 }
672
-                echo '</table>'."\n";
672
+                echo '</table>' . "\n";
673 673
 
674 674
                 $error = false;
675 675
             } elseif ($rs->recordCount() != 1) {
676
-                echo "<p>{$lang['strrownotunique']}</p>"."\n";
676
+                echo "<p>{$lang['strrownotunique']}</p>" . "\n";
677 677
             } else {
678
-                echo "<p>{$lang['strinvalidparam']}</p>"."\n";
678
+                echo "<p>{$lang['strinvalidparam']}</p>" . "\n";
679 679
             }
680 680
 
681
-            echo '<input type="hidden" name="action" value="editrow" />'."\n";
681
+            echo '<input type="hidden" name="action" value="editrow" />' . "\n";
682 682
             echo $misc->form;
683 683
             if (isset($_REQUEST['table'])) {
684
-                echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['table']), '" />'."\n";
684
+                echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['table']), '" />' . "\n";
685 685
             }
686 686
 
687 687
             if (isset($_REQUEST['subject'])) {
688
-                echo '<input type="hidden" name="subject" value="', htmlspecialchars($_REQUEST['subject']), '" />'."\n";
688
+                echo '<input type="hidden" name="subject" value="', htmlspecialchars($_REQUEST['subject']), '" />' . "\n";
689 689
             }
690 690
 
691 691
             if (isset($_REQUEST['query'])) {
692
-                echo '<input type="hidden" name="query" value="', htmlspecialchars($_REQUEST['query']), '" />'."\n";
692
+                echo '<input type="hidden" name="query" value="', htmlspecialchars($_REQUEST['query']), '" />' . "\n";
693 693
             }
694 694
 
695 695
             if (isset($_REQUEST['count'])) {
696
-                echo '<input type="hidden" name="count" value="', htmlspecialchars($_REQUEST['count']), '" />'."\n";
696
+                echo '<input type="hidden" name="count" value="', htmlspecialchars($_REQUEST['count']), '" />' . "\n";
697 697
             }
698 698
 
699 699
             if (isset($_REQUEST['return'])) {
700
-                echo '<input type="hidden" name="return" value="', htmlspecialchars($_REQUEST['return']), '" />'."\n";
700
+                echo '<input type="hidden" name="return" value="', htmlspecialchars($_REQUEST['return']), '" />' . "\n";
701 701
             }
702 702
 
703
-            echo '<input type="hidden" name="page" value="', htmlspecialchars($_REQUEST['page']), '" />'."\n";
704
-            echo '<input type="hidden" name="sortkey" value="', htmlspecialchars($_REQUEST['sortkey']), '" />'."\n";
705
-            echo '<input type="hidden" name="sortdir" value="', htmlspecialchars($_REQUEST['sortdir']), '" />'."\n";
706
-            echo '<input type="hidden" name="strings" value="', htmlspecialchars($_REQUEST['strings']), '" />'."\n";
707
-            echo '<input type="hidden" name="key" value="', htmlspecialchars(urlencode(serialize($key))), '" />'."\n";
703
+            echo '<input type="hidden" name="page" value="', htmlspecialchars($_REQUEST['page']), '" />' . "\n";
704
+            echo '<input type="hidden" name="sortkey" value="', htmlspecialchars($_REQUEST['sortkey']), '" />' . "\n";
705
+            echo '<input type="hidden" name="sortdir" value="', htmlspecialchars($_REQUEST['sortdir']), '" />' . "\n";
706
+            echo '<input type="hidden" name="strings" value="', htmlspecialchars($_REQUEST['strings']), '" />' . "\n";
707
+            echo '<input type="hidden" name="key" value="', htmlspecialchars(urlencode(serialize($key))), '" />' . "\n";
708 708
             echo '<p>';
709 709
             if (!$error) {
710
-                echo "<input type=\"submit\" name=\"save\" accesskey=\"r\" value=\"{$lang['strsave']}\" />"."\n";
710
+                echo "<input type=\"submit\" name=\"save\" accesskey=\"r\" value=\"{$lang['strsave']}\" />" . "\n";
711 711
             }
712 712
 
713
-            echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />"."\n";
713
+            echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />" . "\n";
714 714
 
715 715
             if ($fksprops !== false) {
716 716
                 if ($conf['autocomplete'] != 'default off') {
717
-                    echo "<input type=\"checkbox\" id=\"no_ac\" value=\"1\" checked=\"checked\" /><label for=\"no_ac\">{$lang['strac']}</label>"."\n";
717
+                    echo "<input type=\"checkbox\" id=\"no_ac\" value=\"1\" checked=\"checked\" /><label for=\"no_ac\">{$lang['strac']}</label>" . "\n";
718 718
                 } else {
719
-                    echo "<input type=\"checkbox\" id=\"no_ac\" value=\"0\" /><label for=\"no_ac\">{$lang['strac']}</label>"."\n";
719
+                    echo "<input type=\"checkbox\" id=\"no_ac\" value=\"0\" /><label for=\"no_ac\">{$lang['strac']}</label>" . "\n";
720 720
                 }
721 721
             }
722 722
 
723
-            echo '</p>'."\n";
724
-            echo '</form>'."\n";
723
+            echo '</p>' . "\n";
724
+            echo '</form>' . "\n";
725 725
         } else {
726 726
             if (!isset($_POST['values'])) {
727 727
                 $_POST['values'] = [];
@@ -759,58 +759,58 @@  discard block
 block discarded – undo
759 759
 
760 760
             $rs = $data->browseRow($_REQUEST['table'], $_REQUEST['key']);
761 761
 
762
-            echo '<form action="'.SUBFOLDER.'/src/views/display.php" method="post">'."\n";
762
+            echo '<form action="' . SUBFOLDER . '/src/views/display.php" method="post">' . "\n";
763 763
             echo $misc->form;
764 764
 
765 765
             if ($rs->recordCount() == 1) {
766
-                echo "<p>{$lang['strconfdeleterow']}</p>"."\n";
766
+                echo "<p>{$lang['strconfdeleterow']}</p>" . "\n";
767 767
 
768 768
                 $fkinfo = [];
769 769
                 echo '<table><tr>';
770 770
                 $this->printTableHeaderCells($rs, false, true);
771 771
                 echo '</tr>';
772
-                echo '<tr class="data1">'."\n";
772
+                echo '<tr class="data1">' . "\n";
773 773
                 $this->printTableRowCells($rs, $fkinfo, true);
774
-                echo '</tr>'."\n";
775
-                echo '</table>'."\n";
776
-                echo '<br />'."\n";
774
+                echo '</tr>' . "\n";
775
+                echo '</table>' . "\n";
776
+                echo '<br />' . "\n";
777 777
 
778
-                echo '<input type="hidden" name="action" value="delrow" />'."\n";
779
-                echo "<input type=\"submit\" name=\"yes\" value=\"{$lang['stryes']}\" />"."\n";
780
-                echo "<input type=\"submit\" name=\"no\" value=\"{$lang['strno']}\" />"."\n";
778
+                echo '<input type="hidden" name="action" value="delrow" />' . "\n";
779
+                echo "<input type=\"submit\" name=\"yes\" value=\"{$lang['stryes']}\" />" . "\n";
780
+                echo "<input type=\"submit\" name=\"no\" value=\"{$lang['strno']}\" />" . "\n";
781 781
             } elseif ($rs->recordCount() != 1) {
782
-                echo "<p>{$lang['strrownotunique']}</p>"."\n";
783
-                echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />"."\n";
782
+                echo "<p>{$lang['strrownotunique']}</p>" . "\n";
783
+                echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />" . "\n";
784 784
             } else {
785
-                echo "<p>{$lang['strinvalidparam']}</p>"."\n";
786
-                echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />"."\n";
785
+                echo "<p>{$lang['strinvalidparam']}</p>" . "\n";
786
+                echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />" . "\n";
787 787
             }
788 788
             if (isset($_REQUEST['table'])) {
789
-                echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['table']), '" />'."\n";
789
+                echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['table']), '" />' . "\n";
790 790
             }
791 791
 
792 792
             if (isset($_REQUEST['subject'])) {
793
-                echo '<input type="hidden" name="subject" value="', htmlspecialchars($_REQUEST['subject']), '" />'."\n";
793
+                echo '<input type="hidden" name="subject" value="', htmlspecialchars($_REQUEST['subject']), '" />' . "\n";
794 794
             }
795 795
 
796 796
             if (isset($_REQUEST['query'])) {
797
-                echo '<input type="hidden" name="query" value="', htmlspecialchars($_REQUEST['query']), '" />'."\n";
797
+                echo '<input type="hidden" name="query" value="', htmlspecialchars($_REQUEST['query']), '" />' . "\n";
798 798
             }
799 799
 
800 800
             if (isset($_REQUEST['count'])) {
801
-                echo '<input type="hidden" name="count" value="', htmlspecialchars($_REQUEST['count']), '" />'."\n";
801
+                echo '<input type="hidden" name="count" value="', htmlspecialchars($_REQUEST['count']), '" />' . "\n";
802 802
             }
803 803
 
804 804
             if (isset($_REQUEST['return'])) {
805
-                echo '<input type="hidden" name="return" value="', htmlspecialchars($_REQUEST['return']), '" />'."\n";
805
+                echo '<input type="hidden" name="return" value="', htmlspecialchars($_REQUEST['return']), '" />' . "\n";
806 806
             }
807 807
 
808
-            echo '<input type="hidden" name="page" value="', htmlspecialchars($_REQUEST['page']), '" />'."\n";
809
-            echo '<input type="hidden" name="sortkey" value="', htmlspecialchars($_REQUEST['sortkey']), '" />'."\n";
810
-            echo '<input type="hidden" name="sortdir" value="', htmlspecialchars($_REQUEST['sortdir']), '" />'."\n";
811
-            echo '<input type="hidden" name="strings" value="', htmlspecialchars($_REQUEST['strings']), '" />'."\n";
812
-            echo '<input type="hidden" name="key" value="', htmlspecialchars(urlencode(serialize($_REQUEST['key']))), '" />'."\n";
813
-            echo '</form>'."\n";
808
+            echo '<input type="hidden" name="page" value="', htmlspecialchars($_REQUEST['page']), '" />' . "\n";
809
+            echo '<input type="hidden" name="sortkey" value="', htmlspecialchars($_REQUEST['sortkey']), '" />' . "\n";
810
+            echo '<input type="hidden" name="sortdir" value="', htmlspecialchars($_REQUEST['sortdir']), '" />' . "\n";
811
+            echo '<input type="hidden" name="strings" value="', htmlspecialchars($_REQUEST['strings']), '" />' . "\n";
812
+            echo '<input type="hidden" name="key" value="', htmlspecialchars(urlencode(serialize($_REQUEST['key']))), '" />' . "\n";
813
+            echo '</form>' . "\n";
814 814
         } else {
815 815
             $status = $data->deleteRow($_POST['table'], unserialize(urldecode($_POST['key'])));
816 816
             if ($status == 0) {
@@ -842,7 +842,7 @@  discard block
 block discarded – undo
842 842
         if (isset($_REQUEST['table'])) {
843 843
             $constraints = $data->getConstraintsWithFields($_REQUEST['table']);
844 844
             if ($constraints->recordCount() > 0) {
845
-                $fkey_information['common_url'] = $misc->getHREF('schema').'&amp;subject=table';
845
+                $fkey_information['common_url'] = $misc->getHREF('schema') . '&amp;subject=table';
846 846
 
847 847
                 /* build the FK constraints data structure */
848 848
                 while (!$constraints->EOF) {
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
                     if ($constr['contype'] == 'f') {
851 851
                         if (!isset($fkey_information['byconstr'][$constr['conid']])) {
852 852
                             $fkey_information['byconstr'][$constr['conid']] = [
853
-                                'url_data' => 'table='.urlencode($constr['f_table']).'&amp;schema='.urlencode($constr['f_schema']),
853
+                                'url_data' => 'table=' . urlencode($constr['f_table']) . '&amp;schema=' . urlencode($constr['f_schema']),
854 854
                                 'fkeys'    => [],
855 855
                                 'consrc'   => $constr['consrc'],
856 856
                             ];
@@ -893,7 +893,7 @@  discard block
 block discarded – undo
893 893
             $finfo = $rs->fetchField($j);
894 894
 
895 895
             if ($args === false) {
896
-                echo '<th class="data">', $misc->printVal($finfo->name), '</th>'."\n";
896
+                echo '<th class="data">', $misc->printVal($finfo->name), '</th>' . "\n";
897 897
             } else {
898 898
                 $args['page'] = $_REQUEST['page'];
899 899
                 $args['sortkey'] = $j + 1;
@@ -909,12 +909,12 @@  discard block
 block discarded – undo
909 909
                 , $misc->printVal($finfo->name);
910 910
                 if ($_REQUEST['sortkey'] == ($j + 1)) {
911 911
                     if ($_REQUEST['sortdir'] == 'asc') {
912
-                        echo '<img src="'.$misc->icon('RaiseArgument').'" alt="asc">';
912
+                        echo '<img src="' . $misc->icon('RaiseArgument') . '" alt="asc">';
913 913
                     } else {
914
-                        echo '<img src="'.$misc->icon('LowerArgument').'" alt="desc">';
914
+                        echo '<img src="' . $misc->icon('LowerArgument') . '" alt="desc">';
915 915
                     }
916 916
                 }
917
-                echo '</a></th>'."\n";
917
+                echo '</a></th>' . "\n";
918 918
             }
919 919
             $j++;
920 920
         }
@@ -950,14 +950,14 @@  discard block
 block discarded – undo
950 950
                         $query_params = $fkey_information['byconstr'][$conid]['url_data'];
951 951
 
952 952
                         foreach ($fkey_information['byconstr'][$conid]['fkeys'] as $p_field => $f_field) {
953
-                            $query_params .= '&amp;'.urlencode("fkey[{$f_field}]").'='.urlencode($rs->fields[$p_field]);
953
+                            $query_params .= '&amp;' . urlencode("fkey[{$f_field}]") . '=' . urlencode($rs->fields[$p_field]);
954 954
                         }
955 955
 
956 956
                         /* $fkey_information['common_url'] is already urlencoded */
957
-                        $query_params .= '&amp;'.$fkey_information['common_url'];
957
+                        $query_params .= '&amp;' . $fkey_information['common_url'];
958 958
                         echo '<div style="display:inline-block;">';
959
-                        echo '<a class="fk fk_'.htmlentities($conid, ENT_QUOTES, 'UTF-8')."\" href=\"display.php?{$query_params}\">";
960
-                        echo '<img src="'.$misc->icon('ForeignKey').'" style="vertical-align:middle;" alt="[fk]" title="'
959
+                        echo '<a class="fk fk_' . htmlentities($conid, ENT_QUOTES, 'UTF-8') . "\" href=\"display.php?{$query_params}\">";
960
+                        echo '<img src="' . $misc->icon('ForeignKey') . '" style="vertical-align:middle;" alt="[fk]" title="'
961 961
                         .htmlentities($fkey_information['byconstr'][$conid]['consrc'], ENT_QUOTES, 'UTF-8')
962 962
                             .'" />';
963 963
                         echo '</a>';
@@ -994,7 +994,7 @@  discard block
 block discarded – undo
994 994
         $rs = $data->browseQuery('SELECT', $_REQUEST['table'], $_REQUEST['query'],
995 995
             null, null, 1, 1, $max_pages);
996 996
 
997
-        echo '<a href="javascript:void(0);" style="display:table-cell;" class="fk_delete"><img alt="[delete]" src="'.$misc->icon('Delete').'" /></a>'."\n";
997
+        echo '<a href="javascript:void(0);" style="display:table-cell;" class="fk_delete"><img alt="[delete]" src="' . $misc->icon('Delete') . '" /></a>' . "\n";
998 998
         echo '<div style="display:table-cell;">';
999 999
 
1000 1000
         if (is_object($rs) && $rs->recordCount() > 0) {
@@ -1006,10 +1006,10 @@  discard block
 block discarded – undo
1006 1006
             echo '<table><tr>';
1007 1007
             $this->printTableHeaderCells($rs, false, true);
1008 1008
             echo '</tr>';
1009
-            echo '<tr class="data1">'."\n";
1009
+            echo '<tr class="data1">' . "\n";
1010 1010
             $this->printTableRowCells($rs, $fkinfo, true);
1011
-            echo '</tr>'."\n";
1012
-            echo '</table>'."\n";
1011
+            echo '</tr>' . "\n";
1012
+            echo '</table>' . "\n";
1013 1013
         } else {
1014 1014
             echo $lang['strnodata'];
1015 1015
         }
Please login to merge, or discard this patch.
src/controllers/SequencesController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
             $this->printTitle($lang['strdrop'], 'pg.sequence.drop');
398 398
             $this->printMsg($msg);
399 399
 
400
-            echo '<form action="'.SUBFOLDER."/src/views/sequences.php\" method=\"post\">\n";
400
+            echo '<form action="' . SUBFOLDER . "/src/views/sequences.php\" method=\"post\">\n";
401 401
 
402 402
             //If multi drop
403 403
             if (isset($_REQUEST['ma'])) {
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
         $this->printTitle($lang['strcreatesequence'], 'pg.sequence.create');
492 492
         $this->printMsg($msg);
493 493
 
494
-        echo '<form action="'.SUBFOLDER."/src/views/sequences.php\" method=\"post\">\n";
494
+        echo '<form action="' . SUBFOLDER . "/src/views/sequences.php\" method=\"post\">\n";
495 495
         echo "<table>\n";
496 496
 
497 497
         echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n";
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
         $sequence = $data->getSequence($_REQUEST['sequence']);
647 647
 
648 648
         if (is_object($sequence) && $sequence->recordCount() > 0) {
649
-            echo '<form action="'.SUBFOLDER."/src/views/sequences.php\" method=\"post\">\n";
649
+            echo '<form action="' . SUBFOLDER . "/src/views/sequences.php\" method=\"post\">\n";
650 650
             echo '<table border="0">';
651 651
             echo "<tr><th class=\"data left required\">{$lang['strlastvalue']}</th>\n";
652 652
             echo '<td class="data1">';
@@ -772,7 +772,7 @@  discard block
 block discarded – undo
772 772
                 $_POST['formCycledValue'] = 'on';
773 773
             }
774 774
 
775
-            echo '<form action="'.SUBFOLDER."/src/views/sequences.php\" method=\"post\">\n";
775
+            echo '<form action="' . SUBFOLDER . "/src/views/sequences.php\" method=\"post\">\n";
776 776
             echo "<table>\n";
777 777
 
778 778
             echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n";
Please login to merge, or discard this patch.
src/controllers/GroupsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
             echo '<p>', sprintf($lang['strconfdropmember'], $misc->printVal($_REQUEST['user']), $misc->printVal($_REQUEST['group'])), "</p>\n";
165 165
 
166
-            echo '<form action="'.SUBFOLDER."/src/views/groups.php\" method=\"post\">\n";
166
+            echo '<form action="' . SUBFOLDER . "/src/views/groups.php\" method=\"post\">\n";
167 167
             echo $misc->form;
168 168
             echo "<input type=\"hidden\" name=\"action\" value=\"drop_member\" />\n";
169 169
             echo '<input type="hidden" name="group" value="', htmlspecialchars($_REQUEST['group']), "\" />\n";
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
         }
234 234
 
235 235
         // Display form for adding a user to the group
236
-        echo '<form action="'.SUBFOLDER."/src/views/groups.php\" method=\"post\">\n";
236
+        echo '<form action="' . SUBFOLDER . "/src/views/groups.php\" method=\"post\">\n";
237 237
         echo '<select name="user">';
238 238
         while (!$users->EOF) {
239 239
             $uname = $misc->printVal($users->fields['usename']);
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 
278 278
             echo '<p>', sprintf($lang['strconfdropgroup'], $misc->printVal($_REQUEST['group'])), "</p>\n";
279 279
 
280
-            echo '<form action="'.SUBFOLDER."/src/views/groups.php\" method=\"post\">\n";
280
+            echo '<form action="' . SUBFOLDER . "/src/views/groups.php\" method=\"post\">\n";
281 281
             echo $misc->form;
282 282
             echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
283 283
             echo '<input type="hidden" name="group" value="', htmlspecialchars($_REQUEST['group']), "\" />\n";
Please login to merge, or discard this patch.
src/controllers/MaterializedviewpropertiesController.php 1 patch
Spacing   +7 added lines, -7 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['strviews'].' - '.$_REQUEST['matview']);
25
+        $this->printHeader($lang['strviews'] . ' - ' . $_REQUEST['matview']);
26 26
         $this->printBody();
27 27
 
28 28
         switch ($action) {
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $lang = $this->lang;
92 92
         $data = $misc->getDatabaseAccessor();
93 93
 
94
-        $attPre = function (&$rowdata) use ($data) {
94
+        $attPre = function(&$rowdata) use ($data) {
95 95
             $rowdata->fields['+type'] = $data->formatType($rowdata->fields['type'], $rowdata->fields['atttypmod']);
96 96
         };
97 97
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             'column'  => [
114 114
                 'title' => $lang['strcolumn'],
115 115
                 'field' => Decorator::field('attname'),
116
-                'url'   => "colproperties.php?subject=column&amp;{$misc->href}&amp;view=".urlencode($_REQUEST['matview']).'&amp;',
116
+                'url'   => "colproperties.php?subject=column&amp;{$misc->href}&amp;view=" . urlencode($_REQUEST['matview']) . '&amp;',
117 117
                 'vars'  => ['column' => 'attname'],
118 118
             ],
119 119
             'type'    => [
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
                 $_POST['formComment'] = $viewdata->fields['relcomment'];
301 301
             }
302 302
 
303
-            echo '<form action="'.SUBFOLDER."/src/views/materializedviewproperties.php\" method=\"post\">\n";
303
+            echo '<form action="' . SUBFOLDER . "/src/views/materializedviewproperties.php\" method=\"post\">\n";
304 304
             echo "<table style=\"width: 100%\">\n";
305 305
             echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strdefinition']}</th>\n";
306 306
             echo "\t\t<td class=\"data1\"><textarea style=\"width: 100%;\" rows=\"20\" cols=\"50\" name=\"formDefinition\">",
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
         $this->printTabs('view', 'export');
339 339
         $this->printMsg($msg);
340 340
 
341
-        echo '<form action="'.SUBFOLDER."/src/views/dataexport.php\" method=\"post\">\n";
341
+        echo '<form action="' . SUBFOLDER . "/src/views/dataexport.php\" method=\"post\">\n";
342 342
         echo "<table>\n";
343 343
         echo "<tr><th class=\"data\">{$lang['strformat']}</th><th class=\"data\" colspan=\"2\">{$lang['stroptions']}</th></tr>\n";
344 344
         // Data only
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
                 $this->printTitle($lang['stralter'], 'pg.column.alter');
454 454
                 $this->printMsg($msg);
455 455
 
456
-                echo '<form action="'.SUBFOLDER."/src/views/materializedviewproperties.php\" method=\"post\">\n";
456
+                echo '<form action="' . SUBFOLDER . "/src/views/materializedviewproperties.php\" method=\"post\">\n";
457 457
 
458 458
                 // Output view header
459 459
                 echo "<table>\n";
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
                     $_POST['comment'] = $view->fields['relcomment'];
550 550
                 }
551 551
 
552
-                echo '<form action="'.SUBFOLDER."/src/views/materializedviewproperties.php\" method=\"post\">\n";
552
+                echo '<form action="' . SUBFOLDER . "/src/views/materializedviewproperties.php\" method=\"post\">\n";
553 553
                 echo "<table>\n";
554 554
                 echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n";
555 555
                 echo '<td class="data1">';
Please login to merge, or discard this patch.
src/controllers/ViewpropertiesController.php 1 patch
Spacing   +7 added lines, -7 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['strviews'].' - '.$_REQUEST['view']);
25
+        $this->printHeader($lang['strviews'] . ' - ' . $_REQUEST['view']);
26 26
         $this->printBody();
27 27
 
28 28
         switch ($action) {
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $lang = $this->lang;
92 92
         $data = $misc->getDatabaseAccessor();
93 93
 
94
-        $attPre = function (&$rowdata) use ($data) {
94
+        $attPre = function(&$rowdata) use ($data) {
95 95
             $rowdata->fields['+type'] = $data->formatType($rowdata->fields['type'], $rowdata->fields['atttypmod']);
96 96
         };
97 97
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             'column'  => [
114 114
                 'title' => $lang['strcolumn'],
115 115
                 'field' => Decorator::field('attname'),
116
-                'url'   => "colproperties.php?subject=column&amp;{$misc->href}&amp;view=".urlencode($_REQUEST['view']).'&amp;',
116
+                'url'   => "colproperties.php?subject=column&amp;{$misc->href}&amp;view=" . urlencode($_REQUEST['view']) . '&amp;',
117 117
                 'vars'  => ['column' => 'attname'],
118 118
             ],
119 119
             'type'    => [
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
                 $_POST['formComment'] = $viewdata->fields['relcomment'];
301 301
             }
302 302
 
303
-            echo '<form action="'.SUBFOLDER."/src/views/viewproperties.php\" method=\"post\">\n";
303
+            echo '<form action="' . SUBFOLDER . "/src/views/viewproperties.php\" method=\"post\">\n";
304 304
             echo "<table style=\"width: 100%\">\n";
305 305
             echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strdefinition']}</th>\n";
306 306
             echo "\t\t<td class=\"data1\"><textarea style=\"width: 100%;\" rows=\"20\" cols=\"50\" name=\"formDefinition\">",
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
         $this->printTabs('view', 'export');
339 339
         $this->printMsg($msg);
340 340
 
341
-        echo '<form action="'.SUBFOLDER."/src/views/dataexport.php\" method=\"post\">\n";
341
+        echo '<form action="' . SUBFOLDER . "/src/views/dataexport.php\" method=\"post\">\n";
342 342
         echo "<table>\n";
343 343
         echo "<tr><th class=\"data\">{$lang['strformat']}</th><th class=\"data\" colspan=\"2\">{$lang['stroptions']}</th></tr>\n";
344 344
         // Data only
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
                 $this->printTitle($lang['stralter'], 'pg.column.alter');
454 454
                 $this->printMsg($msg);
455 455
 
456
-                echo '<form action="'.SUBFOLDER."/src/views/viewproperties.php\" method=\"post\">\n";
456
+                echo '<form action="' . SUBFOLDER . "/src/views/viewproperties.php\" method=\"post\">\n";
457 457
 
458 458
                 // Output view header
459 459
                 echo "<table>\n";
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
                     $_POST['comment'] = $view->fields['relcomment'];
550 550
                 }
551 551
 
552
-                echo '<form action="'.SUBFOLDER."/src/views/viewproperties.php\" method=\"post\">\n";
552
+                echo '<form action="' . SUBFOLDER . "/src/views/viewproperties.php\" method=\"post\">\n";
553 553
                 echo "<table>\n";
554 554
                 echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n";
555 555
                 echo '<td class="data1">';
Please login to merge, or discard this patch.
src/controllers/ColpropertiesController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         $action = $this->action;
30 30
         $data = $misc->getDatabaseAccessor();
31 31
 
32
-        $this->printHeader($lang['strtables'].' - '.$this->tableName, null, true, 'header_select2.twig');
32
+        $this->printHeader($lang['strtables'] . ' - ' . $this->tableName, null, true, 'header_select2.twig');
33 33
         $this->printBody();
34 34
 
35 35
         if (isset($_REQUEST['view'])) {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $lang = $this->lang;
64 64
         $data = $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
 
@@ -232,8 +232,8 @@  discard block
 block discarded – undo
232 232
                 $this->printTitle($lang['stralter'], 'pg.column.alter');
233 233
                 $this->printMsg($msg);
234 234
 
235
-                echo '<script src="'.SUBFOLDER.'/js/tables.js" type="text/javascript"></script>';
236
-                echo '<form action="'.SUBFOLDER."/src/views/colproperties.php\" method=\"post\">\n";
235
+                echo '<script src="' . SUBFOLDER . '/js/tables.js" type="text/javascript"></script>';
236
+                echo '<form action="' . SUBFOLDER . "/src/views/colproperties.php\" method=\"post\">\n";
237 237
 
238 238
                 // Output table header
239 239
                 echo "<table>\n";
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
                     $types = $data->getTypes(true, false, true);
291 291
                     $types_for_js = [];
292 292
 
293
-                    echo "<td><select name=\"type\" id=\"type\" class=\"select2\" onchange=\"checkLengths(document.getElementById('type').value,'');\">"."\n";
293
+                    echo "<td><select name=\"type\" id=\"type\" class=\"select2\" onchange=\"checkLengths(document.getElementById('type').value,'');\">" . "\n";
294 294
                     while (!$types->EOF) {
295 295
                         $typname = $types->fields['typname'];
296 296
                         $types_for_js[] = $typname;
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
                 echo "<input type=\"submit\" value=\"{$lang['stralter']}\" />\n";
345 345
                 echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>\n";
346 346
                 echo "</form>\n";
347
-                echo '<script type="text/javascript">predefined_lengths = new Array('.implode(',', $escaped_predef_types).");checkLengths(document.getElementById('type').value,'');</script>\n";
347
+                echo '<script type="text/javascript">predefined_lengths = new Array(' . implode(',', $escaped_predef_types) . ");checkLengths(document.getElementById('type').value,'');</script>\n";
348 348
                 break;
349 349
             case 2:
350 350
                 // Check inputs
@@ -370,10 +370,10 @@  discard block
 block discarded – undo
370 370
                         $_REQUEST['column'] = $_REQUEST['field'];
371 371
                         $misc->setReloadBrowser(true);
372 372
                     }
373
-                    $this->doDefault($sql."<br/>{$lang['strcolumnaltered']}");
373
+                    $this->doDefault($sql . "<br/>{$lang['strcolumnaltered']}");
374 374
                 } else {
375 375
                     $_REQUEST['stage'] = 1;
376
-                    $this->doAlter($sql."<br/>{$lang['strcolumnalteredbad']}");
376
+                    $this->doAlter($sql . "<br/>{$lang['strcolumnalteredbad']}");
377 377
 
378 378
                     return;
379 379
                 }
Please login to merge, or discard this patch.
src/controllers/TriggersController.php 1 patch
Spacing   +7 added lines, -7 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['strtables'].' - '.$_REQUEST['table'].' - '.$lang['strtriggers']);
25
+        $this->printHeader($lang['strtables'] . ' - ' . $_REQUEST['table'] . ' - ' . $lang['strtriggers']);
26 26
         $this->printBody();
27 27
 
28 28
         switch ($action) {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $lang = $this->lang;
100 100
         $data = $misc->getDatabaseAccessor();
101 101
 
102
-        $tgPre = function (&$rowdata, $actions) use ($data) {
102
+        $tgPre = function(&$rowdata, $actions) use ($data) {
103 103
             // toggle enable/disable trigger per trigger
104 104
             if (!$data->phpBool($rowdata->fields['tgenabled'])) {
105 105
                 unset($actions['disable']);
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
                 $_POST['name'] = $triggerdata->fields['tgname'];
275 275
             }
276 276
 
277
-            echo '<form action="'.SUBFOLDER."/src/views/triggers.php\" method=\"post\">\n";
277
+            echo '<form action="' . SUBFOLDER . "/src/views/triggers.php\" method=\"post\">\n";
278 278
             echo "<table>\n";
279 279
             echo "<tr><th class=\"data\">{$lang['strname']}</th>\n";
280 280
             echo '<td class="data1">';
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
             echo '<p>', sprintf($lang['strconfdroptrigger'], $misc->printVal($_REQUEST['trigger']),
311 311
                 $misc->printVal($_REQUEST['table'])), "</p>\n";
312 312
 
313
-            echo '<form action="'.SUBFOLDER."/src/views/triggers.php\" method=\"post\">\n";
313
+            echo '<form action="' . SUBFOLDER . "/src/views/triggers.php\" method=\"post\">\n";
314 314
             echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
315 315
             echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['table']), "\" />\n";
316 316
             echo '<input type="hidden" name="trigger" value="', htmlspecialchars($_REQUEST['trigger']), "\" />\n";
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
             echo '<p>', sprintf($lang['strconfenabletrigger'], $misc->printVal($_REQUEST['trigger']),
347 347
                 $misc->printVal($_REQUEST['table'])), "</p>\n";
348 348
 
349
-            echo '<form action="'.SUBFOLDER."/src/views/triggers.php\" method=\"post\">\n";
349
+            echo '<form action="' . SUBFOLDER . "/src/views/triggers.php\" method=\"post\">\n";
350 350
             echo "<input type=\"hidden\" name=\"action\" value=\"enable\" />\n";
351 351
             echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['table']), "\" />\n";
352 352
             echo '<input type="hidden" name="trigger" value="', htmlspecialchars($_REQUEST['trigger']), "\" />\n";
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
             echo '<p>', sprintf($lang['strconfdisabletrigger'], $misc->printVal($_REQUEST['trigger']),
382 382
                 $misc->printVal($_REQUEST['table'])), "</p>\n";
383 383
 
384
-            echo '<form action="'.SUBFOLDER."/src/views/triggers.php\" method=\"post\">\n";
384
+            echo '<form action="' . SUBFOLDER . "/src/views/triggers.php\" method=\"post\">\n";
385 385
             echo "<input type=\"hidden\" name=\"action\" value=\"disable\" />\n";
386 386
             echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['table']), "\" />\n";
387 387
             echo '<input type="hidden" name="trigger" value="', htmlspecialchars($_REQUEST['trigger']), "\" />\n";
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
         $sel3 = new \PHPPgAdmin\XHtml\XHtmlSelect('formFrequency');
441 441
         $sel3->set_data($data->triggerFrequency);
442 442
 
443
-        echo '<form action="'.SUBFOLDER."/src/views/triggers.php\" method=\"post\">\n";
443
+        echo '<form action="' . SUBFOLDER . "/src/views/triggers.php\" method=\"post\">\n";
444 444
         echo "<table>\n";
445 445
         echo "<tr>\n";
446 446
         echo "		<th class=\"data\">{$lang['strname']}</th>\n";
Please login to merge, or discard this patch.
src/controllers/AcinsertController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
                 echo '<th>';
53 53
 
54 54
                 if (in_array($h, $fkeynames)) {
55
-                    echo '<img src="'.$misc->icon('ForeignKey').'" alt="[referenced key]" />';
55
+                    echo '<img src="' . $misc->icon('ForeignKey') . '" alt="[referenced key]" />';
56 56
                 }
57 57
 
58 58
                 echo htmlentities($h, ENT_QUOTES, 'UTF-8'), '</th>';
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
                 $js .= "fkl_hasnext=false;\n";
99 99
             }
100 100
 
101
-            echo $js.'</script>';
101
+            echo $js . '</script>';
102 102
         } else {
103 103
             printf("<p>{$lang['strnofkref']}</p>", "\"{$_POST['f_schema']}\".\"{$_POST['f_table']}\".\"{$fkeynames[$_POST['fattpos']]}\"");
104 104
 
Please login to merge, or discard this patch.
src/controllers/DbexportController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
             // Obtain the pg_dump version number and check if the path is good
41 41
             $version = [];
42
-            preg_match("/(\d+(?:\.\d+)?)(?:\.\d+)?.*$/", exec($exe.' --version'), $version);
42
+            preg_match("/(\d+(?:\.\d+)?)(?:\.\d+)?.*$/", exec($exe . ' --version'), $version);
43 43
 
44 44
             $this->prtrace('$exe', $exe, 'version', $version[1]);
45 45
 
@@ -77,20 +77,20 @@  discard block
 block discarded – undo
77 77
             }
78 78
 
79 79
             // Set environmental variables that pg_dump uses
80
-            putenv('PGPASSWORD='.$server_info['password']);
81
-            putenv('PGUSER='.$server_info['username']);
80
+            putenv('PGPASSWORD=' . $server_info['password']);
81
+            putenv('PGUSER=' . $server_info['username']);
82 82
             $hostname = $server_info['host'];
83 83
             if ($hostname !== null && $hostname != '') {
84
-                putenv('PGHOST='.$hostname);
84
+                putenv('PGHOST=' . $hostname);
85 85
             }
86 86
             $port = $server_info['port'];
87 87
             if ($port !== null && $port != '') {
88
-                putenv('PGPORT='.$port);
88
+                putenv('PGPORT=' . $port);
89 89
             }
90 90
 
91 91
             // Build command for executing pg_dump.  '-i' means ignore version differences.
92 92
             if (((float) $version[1]) < 9.5) {
93
-                $cmd = $exe.' -i';
93
+                $cmd = $exe . ' -i';
94 94
             } else {
95 95
                 $cmd = $exe;
96 96
             }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             switch ($_REQUEST['subject']) {
106 106
                 case 'schema':
107 107
                     // This currently works for 8.2+ (due to the orthoganl -t -n issue introduced then)
108
-                    $cmd .= ' -n '.$misc->escapeShellArg("\"{$f_schema}\"");
108
+                    $cmd .= ' -n ' . $misc->escapeShellArg("\"{$f_schema}\"");
109 109
                     break;
110 110
                 case 'table':
111 111
                 case 'view':
@@ -116,13 +116,13 @@  discard block
 block discarded – undo
116 116
                     // Starting in 8.2, -n and -t are orthagonal, so we now schema qualify
117 117
                     // the table name in the -t argument and quote both identifiers
118 118
                     if (((float) $version[1]) >= 8.2) {
119
-                        $cmd .= ' -t '.$misc->escapeShellArg("\"{$f_schema}\".\"{$f_object}\"");
119
+                        $cmd .= ' -t ' . $misc->escapeShellArg("\"{$f_schema}\".\"{$f_object}\"");
120 120
                     } else {
121 121
                         // If we are 7.4 or higher, assume they are using 7.4 pg_dump and
122 122
                         // set dump schema as well.  Also, mixed case dumping has been fixed
123 123
                         // then..
124
-                        $cmd .= ' -t '.$misc->escapeShellArg($f_object)
125
-                        .' -n '.$misc->escapeShellArg($f_schema);
124
+                        $cmd .= ' -t ' . $misc->escapeShellArg($f_object)
125
+                        .' -n ' . $misc->escapeShellArg($f_schema);
126 126
                     }
127 127
             }
128 128
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
             }
164 164
 
165 165
             if (!$dumpall) {
166
-                putenv('PGDATABASE='.$_REQUEST['database']);
166
+                putenv('PGDATABASE=' . $_REQUEST['database']);
167 167
             }
168 168
 
169 169
             $this->prtrace('ENV VARS', [
Please login to merge, or discard this patch.