Passed
Push — GENERAL_BUG_REVIEW_240911 ( 3362b2...8cbbee )
by Rafael
49:13
created
public/htdocs/webhook/target_list.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -39,15 +39,15 @@  discard block
 block discarded – undo
39 39
 $langs->loadLangs(array('other'));
40 40
 
41 41
 // Get Parameters
42
-$action      = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view';    // The action 'add', 'create', 'edit', 'update', 'view', ...
43
-$massaction  = GETPOST('massaction', 'alpha');    // The bulk action (combo box choice into lists)
44
-$show_files  = GETPOSTINT('show_files');    // Show files area generated by bulk actions ?
45
-$confirm     = GETPOST('confirm', 'alpha');    // Result of a confirmation
46
-$cancel      = GETPOST('cancel', 'alpha');    // We click on a Cancel button
47
-$toselect    = GETPOST('toselect', 'array');    // Array of ids of elements selected into a list
48
-$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'targetlist';    // To manage different context of search
49
-$backtopage  = GETPOST('backtopage', 'alpha');    // Go back to a dedicated page
50
-$optioncss   = GETPOST('optioncss', 'aZ');    // Option for the css output (always '' except when 'print')
42
+$action      = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
43
+$massaction  = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
44
+$show_files  = GETPOSTINT('show_files'); // Show files area generated by bulk actions ?
45
+$confirm     = GETPOST('confirm', 'alpha'); // Result of a confirmation
46
+$cancel      = GETPOST('cancel', 'alpha'); // We click on a Cancel button
47
+$toselect    = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
48
+$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'targetlist'; // To manage different context of search
49
+$backtopage  = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
50
+$optioncss   = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
51 51
 $mode        = GETPOST('mode', 'aZ');
52 52
 if (empty($mode)) {
53 53
     $mode = 'modulesetup';
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
 // Default sort order (if not yet defined by previous GETPOST)
84 84
 if (!$sortfield) {
85
-    reset($object->fields);                 // Reset is required to avoid key() to return null.
85
+    reset($object->fields); // Reset is required to avoid key() to return null.
86 86
     $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition.
87 87
 }
88 88
 if (!$sortorder) {
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
 }
519 519
 
520 520
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
521
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
521
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
522 522
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
523 523
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
524 524
 
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
     } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
613 613
         $cssforfield .= ($cssforfield ? ' ' : '') . 'right';
614 614
     }
615
-    $cssforfield = preg_replace('/small\s*/', '', $cssforfield);    // the 'small' css must not be used for the title label
615
+    $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
616 616
     if (!empty($arrayfields['t.' . $key]['checked'])) {
617 617
         print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist'])) . "\n";
618 618
         $totalarray['nbfield']++;
Please login to merge, or discard this patch.
public/htdocs/webhook/target_card.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 global $conf, $db, $hookmanager, $langs, $user;
37 37
 
38 38
 // Load translation files required by the page
39
-$langs->loadLangs(array('other','admin'));
39
+$langs->loadLangs(array('other', 'admin'));
40 40
 
41 41
 // Get parameters
42 42
 $id = GETPOSTINT('id');
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'targetcard'; // To manage different context of search
48 48
 $backtopage = GETPOST('backtopage', 'alpha');
49 49
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
50
-$lineid   = GETPOSTINT('lineid');
50
+$lineid = GETPOSTINT('lineid');
51 51
 
52 52
 // Initialize technical objects
53 53
 $object = new Target($db);
Please login to merge, or discard this patch.
public/htdocs/reception/card.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -966,7 +966,7 @@
 block discarded – undo
966 966
             /**
967 967
              * @var array $suffix2numAsked map HTTP query parameter suffixes (like '1_0') to line indices so that
968 968
              *                             extrafields from HTTP query can be assigned to the correct dispatch line
969
-            */
969
+             */
970 970
             $suffix2numAsked = array();
971 971
             $dispatchLines = array();
972 972
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 
344 344
         // Loop lines to calculate $totalqty
345 345
         for ($i = 1; $i <= $num; $i++) {
346
-            $idl = "idl" . $i;    // id line source
346
+            $idl = "idl" . $i; // id line source
347 347
 
348 348
             //$sub_qty = array();
349 349
             //$subtotalqty = 0;
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
             //$j = 0;
352 352
             //$batch = "batchl".$i."_0";
353 353
             //$stockLocation = "ent1".$i."_0";
354
-            $qty = "qtyl" . $i;   // qty
354
+            $qty = "qtyl" . $i; // qty
355 355
 
356 356
             //reception line for product with no batch management and no multiple stock location
357 357
             if (GETPOST($qty, 'alpha') > 0) {
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 
366 366
         if ($totalqty > 0) {  // There is at least one thing to ship
367 367
             for ($i = 1; $i <= $num; $i++) {
368
-                $idl = "idl" . $i;    // id line source
368
+                $idl = "idl" . $i; // id line source
369 369
                 $lineToTest = '';
370 370
                 $lineId = GETPOSTINT($idl);
371 371
                 foreach ($objectsrc->lines as $linesrc) {
@@ -1144,7 +1144,7 @@  discard block
 block discarded – undo
1144 1144
 
1145 1145
                     print '<input type="hidden" name="productl' . $indiceAsked . '" value="' . $line->fk_product . '">';
1146 1146
 
1147
-                    if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) { // Add test to avoid to show qty twice
1147
+                    if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) { // Add test to avoid to show qty twice
1148 1148
                         print '<input type="hidden" name="productid' . $indiceAsked . '" value="' . $line->fk_product . '">';
1149 1149
 
1150 1150
                         // Show product and description
@@ -1166,7 +1166,7 @@  discard block
 block discarded – undo
1166 1166
                     print '</td>';
1167 1167
                 } else {
1168 1168
                     print "<td>";
1169
-                    if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) { // Add test to avoid to show qty twice
1169
+                    if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) { // Add test to avoid to show qty twice
1170 1170
                         if ($type == 1) {
1171 1171
                             $text = img_object($langs->trans('Service'), 'service');
1172 1172
                         } else {
@@ -1195,7 +1195,7 @@  discard block
 block discarded – undo
1195 1195
 
1196 1196
                 // Qty in source purchase order line
1197 1197
                 print '<td class="center">';
1198
-                if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) { // Add test to avoid to show qty twice
1198
+                if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) { // Add test to avoid to show qty twice
1199 1199
                     print $line->qty;
1200 1200
                 }
1201 1201
                 print '<input type="hidden" name="fk_commandefournisseurdet' . $indiceAsked . '" value="' . $line->id . '">';
@@ -1207,7 +1207,7 @@  discard block
 block discarded – undo
1207 1207
                 // Qty already received
1208 1208
                 print '<td class="center">';
1209 1209
                 $quantityDelivered = $objectsrc->receptions[$line->id];
1210
-                if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) { // Add test to avoid to show qty twice
1210
+                if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) { // Add test to avoid to show qty twice
1211 1211
                     print $quantityDelivered;
1212 1212
                 }
1213 1213
                 print '<input name="qtydelivered' . $indiceAsked . '" id="qtydelivered' . $indiceAsked . '" type="hidden" value="' . $quantityDelivered . '">';
Please login to merge, or discard this patch.
public/htdocs/reception/list.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 $search_date_delivery_endday = GETPOSTINT('search_date_delivery_endday');
69 69
 $search_date_delivery_endmonth = GETPOSTINT('search_date_delivery_endmonth');
70 70
 $search_date_delivery_endyear = GETPOSTINT('search_date_delivery_endyear');
71
-$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear);   // Use tzserver
71
+$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear); // Use tzserver
72 72
 $search_date_delivery_end = dol_mktime(23, 59, 59, $search_date_delivery_endmonth, $search_date_delivery_endday, $search_date_delivery_endyear);
73 73
 $search_date_create_startday = GETPOSTINT('search_date_create_startday');
74 74
 $search_date_create_startmonth = GETPOSTINT('search_date_create_startmonth');
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 $search_date_create_endday = GETPOSTINT('search_date_create_endday');
77 77
 $search_date_create_endmonth = GETPOSTINT('search_date_create_endmonth');
78 78
 $search_date_create_endyear = GETPOSTINT('search_date_create_endyear');
79
-$search_date_create_start = dol_mktime(0, 0, 0, $search_date_create_startmonth, $search_date_create_startday, $search_date_create_startyear);   // Use tzserver
79
+$search_date_create_start = dol_mktime(0, 0, 0, $search_date_create_startmonth, $search_date_create_startday, $search_date_create_startyear); // Use tzserver
80 80
 $search_date_create_end = dol_mktime(23, 59, 59, $search_date_create_endmonth, $search_date_create_endday, $search_date_create_endyear);
81 81
 $search_billed = GETPOST("search_billed", 'intcomma');
82 82
 $search_status = GETPOST('search_status', 'intcomma');
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
 $object->fields = dol_sort_array($object->fields, 'position');
146 146
 $arrayfields = dol_sort_array($arrayfields, 'position');
147
-'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
147
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
148 148
 
149 149
 $error = 0;
150 150
 
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
                 // if the VAT reverse-charge is activated by default in supplier card to resume the information
337 337
                 $objecttmp->vat_reverse_charge = $soc->vat_reverse_charge;
338 338
 
339
-                $objecttmp->fk_project          = $rcp->fk_project;
339
+                $objecttmp->fk_project = $rcp->fk_project;
340 340
                 //$objecttmp->multicurrency_code = $rcp->multicurrency_code;
341 341
                 if (empty($createbills_onebythird)) {
342 342
                     $objecttmp->ref_supplier = $rcp->ref;
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
                     }
370 370
                 }
371 371
 
372
-                $res = $objecttmp->create($user);       // This should create the supplier invoice + links into $objecttmp->linked_objects + add a link to ->origin_id
372
+                $res = $objecttmp->create($user); // This should create the supplier invoice + links into $objecttmp->linked_objects + add a link to ->origin_id
373 373
 
374 374
                 //var_dump($objecttmp->error);exit;
375 375
                 if ($res > 0) {
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
             $db->rollback();
577 577
 
578 578
             $action = 'create';
579
-            $_GET["origin"] = $_POST["origin"];     // Keep this ?
579
+            $_GET["origin"] = $_POST["origin"]; // Keep this ?
580 580
             $_GET["originid"] = $_POST["originid"]; // Keep this ?
581 581
             setEventMessages($object->error, $errors, 'errors');
582 582
             $error++;
Please login to merge, or discard this patch.
public/htdocs/website/websiteaccount_card.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -91,9 +91,9 @@
 block discarded – undo
91 91
 } else {
92 92
     $permissiontocreate = isModEnabled('website') && $user->hasRight('website', 'write') || isModEnabled('webportal') && $user->hasRight('webportal', 'write');
93 93
 }
94
-$permissionnote    = $permissiontocreate;   //  Used by the include of actions_setnotes.inc.php
95
-$permissiondellink = $permissiontocreate;   //  Used by the include of actions_dellink.inc.php
96
-$permissiontoadd   = $permissiontocreate;   //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
94
+$permissionnote    = $permissiontocreate; //  Used by the include of actions_setnotes.inc.php
95
+$permissiondellink = $permissiontocreate; //  Used by the include of actions_dellink.inc.php
96
+$permissiontoadd   = $permissiontocreate; //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
97 97
 
98 98
 // check access from type of site on create, edit, delete (other than view)
99 99
 $site_type_js = '';
Please login to merge, or discard this patch.
public/htdocs/website/index.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 if ($sortorder) {
426 426
     $backtopage .= '&sortorder=' . urlencode($sortorder);
427 427
 }
428
-include DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';  // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file.
428
+include DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file.
429 429
 
430 430
 $backtopage = $savbacktopage;
431 431
 //var_dump($backtopage);
@@ -1188,7 +1188,7 @@  discard block
 block discarded – undo
1188 1188
         $content = '';
1189 1189
         if (GETPOSTISSET('content')) {
1190 1190
             //$content = GETPOST('content', 'restricthtmlallowunvalid');    // @TODO Use a restricthtmlallowunvalidwithphp
1191
-            $content = GETPOST('content', 'none');  // @TODO Use a restricthtmlallowunvalidwithphp
1191
+            $content = GETPOST('content', 'none'); // @TODO Use a restricthtmlallowunvalidwithphp
1192 1192
 
1193 1193
             $objectpage->content = make_substitutions($content, $substitutionarray);
1194 1194
         } else {
@@ -1561,7 +1561,7 @@  discard block
 block discarded – undo
1561 1561
                     $error++;
1562 1562
                     setEventMessages($langs->trans('ErrorFaviconMustBeASquaredImage'), array(), 'errors');
1563 1563
                 }
1564
-                if (! $error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) {
1564
+                if (!$error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) {
1565 1565
                     $error++;
1566 1566
                     setEventMessages($langs->trans('ErrorFaviconSize'), array(), 'errors');
1567 1567
                 }
@@ -1573,7 +1573,7 @@  discard block
 block discarded – undo
1573 1573
                 if (!GETPOSTISSET('updateandstay')) {   // If we click on "Save And Stay", we don not make the redirect
1574 1574
                     $action = 'preview';
1575 1575
                     if ($backtopage) {
1576
-                        $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage);    // Clean backtopage url
1576
+                        $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url
1577 1577
                         header("Location: " . $backtopage);
1578 1578
                         exit;
1579 1579
                     }
@@ -1606,7 +1606,7 @@  discard block
 block discarded – undo
1606 1606
             $phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1607 1607
 
1608 1608
             // Security analysis
1609
-            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);   // Contains the setEventMessages
1609
+            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1610 1610
 
1611 1611
             if (!$errorphpcheck) {
1612 1612
                 $htmlheadercontent = '';
@@ -1644,7 +1644,7 @@  discard block
 block discarded – undo
1644 1644
             $phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1645 1645
 
1646 1646
             // Security analysis
1647
-            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);   // Contains the setEventMessages
1647
+            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1648 1648
 
1649 1649
             if (!$errorphpcheck) {
1650 1650
                 $csscontent = '';
@@ -1687,7 +1687,7 @@  discard block
 block discarded – undo
1687 1687
             $phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1688 1688
 
1689 1689
             // Security analysis
1690
-            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);   // Contains the setEventMessages
1690
+            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1691 1691
 
1692 1692
             if (!$errorphpcheck) {
1693 1693
                 $jscontent = '';
@@ -1725,7 +1725,7 @@  discard block
 block discarded – undo
1725 1725
             $phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1726 1726
 
1727 1727
             // Security analysis
1728
-            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);   // Contains the setEventMessages
1728
+            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1729 1729
 
1730 1730
             if (!$errorphpcheck) {
1731 1731
                 $robotcontent = '';
@@ -1763,7 +1763,7 @@  discard block
 block discarded – undo
1763 1763
             $phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1764 1764
 
1765 1765
             // Security analysis
1766
-            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);   // Contains the setEventMessages
1766
+            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1767 1767
 
1768 1768
             if (!$errorphpcheck) {
1769 1769
                 $htaccesscontent = '';
@@ -1787,7 +1787,7 @@  discard block
 block discarded – undo
1787 1787
             $phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1788 1788
 
1789 1789
             // Security analysis
1790
-            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);   // Contains the setEventMessages
1790
+            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1791 1791
 
1792 1792
             if (!$errorphpcheck) {
1793 1793
                 $manifestjsoncontent = '';
@@ -1826,7 +1826,7 @@  discard block
 block discarded – undo
1826 1826
             $phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1827 1827
 
1828 1828
             // Security analysis
1829
-            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);   // Contains the setEventMessages
1829
+            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1830 1830
 
1831 1831
             if (!$errorphpcheck) {
1832 1832
                 $readmecontent = '';
@@ -1865,7 +1865,7 @@  discard block
 block discarded – undo
1865 1865
             $phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1866 1866
 
1867 1867
             // Security analysis
1868
-            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);   // Contains the setEventMessages
1868
+            $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1869 1869
 
1870 1870
             if (!$errorphpcheck) {
1871 1871
                 $licensecontent = '';
@@ -1907,7 +1907,7 @@  discard block
 block discarded – undo
1907 1907
             if (!GETPOSTISSET('updateandstay')) {   // If we click on "Save And Stay", we don not make the redirect
1908 1908
                 $action = 'preview';
1909 1909
                 if ($backtopage) {
1910
-                    $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage);    // Clean backtopage url
1910
+                    $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url
1911 1911
                     header("Location: " . $backtopage);
1912 1912
                     exit;
1913 1913
                 }
@@ -1926,7 +1926,7 @@  discard block
 block discarded – undo
1926 1926
 
1927 1927
     $object->fk_default_home = $pageid;
1928 1928
     $res = $object->update($user);
1929
-    if (! ($res > 0)) {
1929
+    if (!($res > 0)) {
1930 1930
         $error++;
1931 1931
         setEventMessages($object->error, $object->errors, 'errors');
1932 1932
     }
@@ -2540,7 +2540,7 @@  discard block
 block discarded – undo
2540 2540
                 $fileofzip = '';
2541 2541
                 if (GETPOSTISSET('templateuserfile')) {
2542 2542
                     // Case we selected one template
2543
-                    $fileofzip = DOL_DATA_ROOT . '/doctemplates/websites/' . GETPOST('templateuserfile', 'alpha');  // $fileofzip will be sanitized later into the importWebSite()
2543
+                    $fileofzip = DOL_DATA_ROOT . '/doctemplates/websites/' . GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite()
2544 2544
                 } elseif (!empty($_FILES) && is_array($_FILES['userfile'])) {
2545 2545
                     // Case we upload a new template
2546 2546
                     if (is_array($_FILES['userfile']['tmp_name'])) {
@@ -2622,7 +2622,7 @@  discard block
 block discarded – undo
2622 2622
     if ($website->virtualhost) {
2623 2623
         $domainname = $website->virtualhost;
2624 2624
     }
2625
-    if (! preg_match('/^http/i', $domainname)) {
2625
+    if (!preg_match('/^http/i', $domainname)) {
2626 2626
         $domainname = 'https://' . $domainname;
2627 2627
     }
2628 2628
 
@@ -2688,7 +2688,7 @@  discard block
 block discarded – undo
2688 2688
                 $url->appendChild($lastmod);
2689 2689
                 // Add suggested frequency for refresh
2690 2690
                 if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) {
2691
-                    $changefreq = $domtree->createElement('changefreq', 'weekly');  // TODO Manage other values
2691
+                    $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values
2692 2692
                     $url->appendChild($changefreq);
2693 2693
                 }
2694 2694
                 // Add higher priority for home page
@@ -2793,7 +2793,7 @@  discard block
 block discarded – undo
2793 2793
                 $url->appendChild($lastmod);
2794 2794
                 // Add suggested frequency for refresh
2795 2795
                 if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) {
2796
-                    $changefreq = $domtree->createElement('changefreq', 'weekly');  // TODO Manage other values
2796
+                    $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values
2797 2797
                     $url->appendChild($changefreq);
2798 2798
                 }
2799 2799
 
@@ -3618,7 +3618,7 @@  discard block
 block discarded – undo
3618 3618
                 } else {
3619 3619
                     $disabled = '';
3620 3620
                     $title = '';
3621
-                    $url = $_SERVER["PHP_SELF"] . '?action=delete&token=' . newToken() . '&pageid=' . ((int) $websitepage->id) . '&website=' . urlencode($website->ref);    // action=delete for webpage, deletesite for website
3621
+                    $url = $_SERVER["PHP_SELF"] . '?action=delete&token=' . newToken() . '&pageid=' . ((int) $websitepage->id) . '&website=' . urlencode($website->ref); // action=delete for webpage, deletesite for website
3622 3622
                 }
3623 3623
                 print '<a href="' . $url . '" class="button buttonDelete bordertransp' . ($disabled ? ' disabled' : '') . '"' . $disabled . ' title="' . dol_escape_htmltag($title) . '">' . img_picto('', 'delete', 'class=""') . '<span class="hideonsmartphone paddingleft">' . $langs->trans("Delete") . '</span></a>';
3624 3624
                 print '</span>';
@@ -3838,7 +3838,7 @@  discard block
 block discarded – undo
3838 3838
         // Clean the php htaccesscontent file to remove php code and get only html part
3839 3839
         $htaccesscontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP( \?>)?\n*/ims', '', $htaccesscontent);
3840 3840
     } else {
3841
-        $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml');   // We must use 'nohtml' and not 'alphanohtml' because we must accept "
3841
+        $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept "
3842 3842
     }
3843 3843
     if (!trim($htaccesscontent)) {
3844 3844
         $htaccesscontent .= "# Order allow,deny\n";
@@ -3939,7 +3939,7 @@  discard block
 block discarded – undo
3939 3939
     $maxfilesizearray = getMaxFileSizeArray();
3940 3940
     $maxmin = $maxfilesizearray['maxmin'];
3941 3941
     if ($maxmin > 0) {
3942
-        print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">';    // MAX_FILE_SIZE must precede the field type=file
3942
+        print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
3943 3943
     }
3944 3944
     print '<input type="file" class="flat minwidth300" name="addedfile" id="addedfile"/>';
3945 3945
 
@@ -4196,7 +4196,7 @@  discard block
 block discarded – undo
4196 4196
         $maxfilesizearray = getMaxFileSizeArray();
4197 4197
         $maxmin = $maxfilesizearray['maxmin'];
4198 4198
         if ($maxmin > 0) {
4199
-            print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">';    // MAX_FILE_SIZE must precede the field type=file
4199
+            print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
4200 4200
         }
4201 4201
         print '<input class="flat minwidth400" type="file" name="userfile[]" accept=".zip">';
4202 4202
         print '<input type="submit" class="button small" name="buttonsubmitimportfile" value="' . dol_escape_htmltag($langs->trans("Upload")) . '">';
@@ -4854,7 +4854,7 @@  discard block
 block discarded – undo
4854 4854
 
4855 4855
 
4856 4856
     $module = 'medias';
4857
-    $formalreadyopen = 2;   // So the form to submit a new file will not be open another time inside the core/tpl/filemanager.tpl.php
4857
+    $formalreadyopen = 2; // So the form to submit a new file will not be open another time inside the core/tpl/filemanager.tpl.php
4858 4858
     if (empty($url)) {
4859 4859
         $url = constant('BASE_URL') . '/website/index.php'; // Must be an url without param
4860 4860
     }
@@ -5089,8 +5089,8 @@  discard block
 block discarded – undo
5089 5089
             print getTitleFieldOfList("Categories", 0, $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'center ') . "\n";
5090 5090
             print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
5091 5091
             print getTitleFieldOfList("UserCreation", 0, $_SERVER['PHP_SELF'], 'fk_user_creat', '', $param, '', $sortfield, $sortorder, '') . "\n";
5092
-            print getTitleFieldOfList("DateCreation", 0, $_SERVER['PHP_SELF'], 'date_creation', '', $param, '', $sortfield, $sortorder, 'center ') . "\n";        // Date creation
5093
-            print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n";      // Date last modif
5092
+            print getTitleFieldOfList("DateCreation", 0, $_SERVER['PHP_SELF'], 'date_creation', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; // Date creation
5093
+            print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; // Date last modif
5094 5094
             print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
5095 5095
             // Action column
5096 5096
             if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
Please login to merge, or discard this patch.
public/htdocs/dav/fileserver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
      * @param string    $password   Password to validate for $username
101 101
      * @return bool                 True if login ok, false if not
102 102
      */
103
-    static function ($username, $password) {
103
+    static function($username, $password) {
104 104
         global $user, $conf;
105 105
         global $dolibarr_main_authentication, $dolibarr_auto_user;
106 106
 
Please login to merge, or discard this patch.
public/htdocs/takepos/admin/other.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,9 +33,9 @@
 block discarded – undo
33 33
 
34 34
 // If socid provided by ajax company selector
35 35
 if (GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha')) {
36
-    $_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');        // Keep this ?
37
-    $_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');       // Keep this ?
38
-    $_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');    // Keep this ?
36
+    $_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ?
37
+    $_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ?
38
+    $_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ?
39 39
 }
40 40
 
41 41
 // Security check
Please login to merge, or discard this patch.
public/htdocs/takepos/ajax/ajax.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks
59 59
 $hookmanager->initHooks(array('takeposproductsearch')); // new context for product search hooks
60 60
 
61
-$pricelevel = 1;    // default price level if PRODUIT_MULTIPRICES. TODO Get price level from thirdparty.
61
+$pricelevel = 1; // default price level if PRODUIT_MULTIPRICES. TODO Get price level from thirdparty.
62 62
 
63 63
 
64 64
 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
         }
262 262
     }
263 263
 
264
-    $sql = 'SELECT p.rowid, p.ref, p.label, p.tosell, p.tobuy, p.barcode, p.price, p.price_ttc' ;
264
+    $sql = 'SELECT p.rowid, p.ref, p.label, p.tosell, p.tobuy, p.barcode, p.price, p.price_ttc';
265 265
     if (getDolGlobalInt('TAKEPOS_PRODUCT_IN_STOCK') == 1) {
266 266
         if (getDolGlobalInt('CASHDESK_ID_WAREHOUSE' . $_SESSION['takeposterminal'])) {
267 267
             $sql .= ', ps.reel';
Please login to merge, or discard this patch.