Test Failed
Push — main ( c8394f...8477f1 )
by Rafael
66:21
created
public/htdocs/core/ajax/vatrates.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 require constant('DOL_DOCUMENT_ROOT') . '/main.inc.php';
37 37
 
38 38
 $id = GETPOSTINT('id');
39
-$action = GETPOST('action', 'aZ09');    // 'getSellerVATRates' or 'getBuyerVATRates'
39
+$action = GETPOST('action', 'aZ09'); // 'getSellerVATRates' or 'getBuyerVATRates'
40 40
 $htmlname   = GETPOST('htmlname', 'alpha');
41 41
 $selected   = (GETPOST('selected') ? GETPOST('selected') : '-1');
42 42
 $productid = (GETPOSTINT('productid') ? GETPOSTINT('productid') : 0);
Please login to merge, or discard this patch.
public/htdocs/core/ajax/selectsearchbox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
 if (isModEnabled('supplier_proposal') && !getDolGlobalString('MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED') && $user->hasRight('supplier_proposal', 'lire')) {
119 119
     $arrayresult['searchintosupplierpropal'] = array('position' => 100, 'img' => 'object_supplier_proposal', 'label' => $langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text' => img_picto('', 'object_supplier_proposal', 'class="pictofixedwidth"') . ' ' . $langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url' => constant('BASE_URL') . '/supplier_proposal/list.php' . ($search_boxvalue ? '?search_all=' . urlencode($search_boxvalue) : ''));
120 120
 }
121
-if (((isModEnabled('fournisseur') && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled('supplier_order') &&  $user->hasRight('supplier_order', 'lire'))) && !getDolGlobalString('MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED')) {
121
+if (((isModEnabled('fournisseur') && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled('supplier_order') && $user->hasRight('supplier_order', 'lire'))) && !getDolGlobalString('MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED')) {
122 122
     $arrayresult['searchintosupplierorder'] = array('position' => 110, 'img' => 'object_supplier_order', 'label' => $langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text' => img_picto('', 'object_supplier_order', 'class="pictofixedwidth"') . ' ' . $langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url' => constant('BASE_URL') . '/fourn/commande/list.php' . ($search_boxvalue ? '?search_all=' . urlencode($search_boxvalue) : ''));
123 123
 }
124 124
 if (isModEnabled('reception') && !getDolGlobalString('MAIN_SEARCHFORM_SUPPLIER_RECEPTION_DISABLED') && $user->hasRight('reception', 'lire')) {
Please login to merge, or discard this patch.
public/htdocs/core/ajax/locationincoterms.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 
47 47
 // Security check
48 48
 if (!isModEnabled('incoterm')) {
49
-    httponly_accessforbidden("Module incoterm not enabled");    // This includes the exit.
49
+    httponly_accessforbidden("Module incoterm not enabled"); // This includes the exit.
50 50
 }
51 51
 // There is no other permission on this component. Everybody connected can read content of the incoterm table
52 52
 
Please login to merge, or discard this patch.
public/htdocs/core/ajax/row.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     if ($reshook > 0) {
140 140
         $perm = $hookmanager->resArray['perm'];
141 141
     }
142
-    if (! $perm) {
142
+    if (!$perm) {
143 143
         // We should not be here. If we are not allowed to reorder rows, feature should not be visible on script.
144 144
         // If we are here, it is a hack attempt, so we report a warning.
145 145
         print 'Bad permission to modify position of lines for object in table ' . $table_element_line;
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
     // Reorder line to have position of children lines sharing same counter than parent lines
163 163
     // This should be useless because there is no need to have children sharing same counter than parent, but well, it's cleaner into database.
164
-    if (in_array($fk_element, array('fk_facture', 'fk_propal', 'fk_commande','fk_contrat'))) {
164
+    if (in_array($fk_element, array('fk_facture', 'fk_propal', 'fk_commande', 'fk_contrat'))) {
165 165
         $result = $row->line_order(true);
166 166
     }
167 167
 } else {
Please login to merge, or discard this patch.
public/htdocs/core/ajax/check_notifications.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
     $sql .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'actioncomm_reminder as ar ON a.id = ar.fk_actioncomm AND ar.fk_user = ' . ((int) $user->id);
132 132
     $sql .= " AND ar.typeremind = 'browser' AND ar.dateremind < '" . $db->idate(dol_now()) . "'";
133 133
     $sql .= " AND ar.status = 0";
134
-    $sql .= " AND ar.entity = " . ((int) $conf->entity);  // No sharing of entity for alerts
134
+    $sql .= " AND ar.entity = " . ((int) $conf->entity); // No sharing of entity for alerts
135 135
     $sql .= $db->order('datep', 'ASC');
136 136
     $sql .= $db->plimit(10); // Avoid too many notification at once
137 137
 
Please login to merge, or discard this patch.
public/htdocs/core/ajax/objectonoff.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 // Load object according to $id and $element
55 55
 $object = fetchObjectByElement($id, $element);
56 56
 if (!is_object($object)) {
57
-    httponly_accessforbidden("Bad value for combination of parameters element/field: Object not found.");   // This includes the exit.
57
+    httponly_accessforbidden("Bad value for combination of parameters element/field: Object not found."); // This includes the exit.
58 58
 }
59 59
 
60 60
 $object->fields[$field] = array('type' => $format, 'enabled' => 1);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 if (!empty($user->socid)) {
73 73
     $socid = $user->socid;
74 74
     if (!empty($object->socid) && $socid != $object->socid) {
75
-        httponly_accessforbidden("Access on object not allowed for this external user.");   // This includes the exit.
75
+        httponly_accessforbidden("Access on object not allowed for this external user."); // This includes the exit.
76 76
     }
77 77
 }
78 78
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 } elseif ($element == 'product' && in_array($field, array('tosell', 'tobuy', 'tobatch'))) { // Special case for products
84 84
     restrictedArea($user, 'produit|service', $object, 'product&product', '', '', 'rowid');
85 85
 } else {
86
-    httponly_accessforbidden("Bad value for combination of parameters element/field: Field not supported.");    // This includes the exit.
86
+    httponly_accessforbidden("Bad value for combination of parameters element/field: Field not supported."); // This includes the exit.
87 87
 }
88 88
 
89 89
 
Please login to merge, or discard this patch.
public/htdocs/core/bookmarks_page.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
 $title = $langs->trans("Bookmarks");
72 72
 
73 73
 // URL http://mydolibarr/core/bookmarks_page?dol_use_jmobile=1 can be used for tests
74
-$head = '<!-- Bookmarks -->' . "\n";  // This is used by DoliDroid to know page is a bookmark selection page
74
+$head = '<!-- Bookmarks -->' . "\n"; // This is used by DoliDroid to know page is a bookmark selection page
75 75
 $arrayofjs = array();
76 76
 $arrayofcss = array();
77 77
 top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
Please login to merge, or discard this patch.
public/htdocs/core/actions_sendmails.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -398,7 +398,7 @@
 block discarded – undo
398 398
                         $object->actionmsg = $message; // Long text
399 399
                         $object->actionmsg2 = $actionmsg2; // Short text ($langs->transnoentities('MailSentByTo')...);
400 400
                         if (getDolGlobalString('MAIN_MAIL_REPLACE_EVENT_TITLE_BY_EMAIL_SUBJECT')) {
401
-                            $object->actionmsg2     = $subject; // Short text
401
+                            $object->actionmsg2 = $subject; // Short text
402 402
                         }
403 403
 
404 404
                         $object->trackid = $trackid;
Please login to merge, or discard this patch.
public/htdocs/core/modules/DolibarrModules.class.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
                 $moduleNameInConf = 'supplier_proposal';
627 627
             }
628 628
 
629
-            unset($conf->modules[$moduleNameInConf]);   // Add this module in list of enabled modules so isModEnabled() will work (conf->module->enabled must no more be used)
629
+            unset($conf->modules[$moduleNameInConf]); // Add this module in list of enabled modules so isModEnabled() will work (conf->module->enabled must no more be used)
630 630
 
631 631
             return 1;
632 632
         } else {
@@ -1487,7 +1487,7 @@  discard block
 block discarded – undo
1487 1487
 
1488 1488
                 $sql = "DELETE FROM " . MAIN_DB_PREFIX . "boxes_def";
1489 1489
                 $sql .= " WHERE file = '" . $this->db->escape($file) . "'";
1490
-                $sql .= " AND entity = " . $conf->entity;     // Do not use getEntity here, we want to delete only in current company
1490
+                $sql .= " AND entity = " . $conf->entity; // Do not use getEntity here, we want to delete only in current company
1491 1491
 
1492 1492
                 dol_syslog(get_class($this) . "::delete_boxes", LOG_DEBUG);
1493 1493
                 $resql = $this->db->query($sql);
@@ -1910,9 +1910,9 @@  discard block
 block discarded – undo
1910 1910
 
1911 1911
                 // If the module is active
1912 1912
                 foreach ($this->rights as $key => $value) {
1913
-                    $r_id = $this->rights[$key][self::KEY_ID];  // permission id in llx_rights_def (not unique because primary key is couple id-entity)
1913
+                    $r_id = $this->rights[$key][self::KEY_ID]; // permission id in llx_rights_def (not unique because primary key is couple id-entity)
1914 1914
                     $r_label = $this->rights[$key][self::KEY_LABEL];
1915
-                    $r_type = $this->rights[$key][self::KEY_TYPE] ?? 'w';   // TODO deprecated
1915
+                    $r_type = $this->rights[$key][self::KEY_TYPE] ?? 'w'; // TODO deprecated
1916 1916
                     $r_default = $this->rights[$key][self::KEY_DEFAULT] ?? 0;
1917 1917
                     $r_perms = $this->rights[$key][self::KEY_FIRST_LEVEL] ?? '';
1918 1918
                     $r_subperms = $this->rights[$key][self::KEY_SECOND_LEVEL] ?? '';
@@ -1936,7 +1936,7 @@  discard block
 block discarded – undo
1936 1936
                     }
1937 1937
 
1938 1938
                     // condition to show or hide a user right (default: 1) (eg isModEnabled('anothermodule') or ($conf->global->MAIN_FEATURES_LEVEL > 0) or etc..)
1939
-                    $r_enabled  = $this->rights[$key][self::KEY_ENABLED] ?? '1';
1939
+                    $r_enabled = $this->rights[$key][self::KEY_ENABLED] ?? '1';
1940 1940
 
1941 1941
                     // Search if perm already present
1942 1942
                     $sql = "SELECT count(*) as nb FROM " . MAIN_DB_PREFIX . "rights_def";
@@ -1953,7 +1953,7 @@  discard block
 block discarded – undo
1953 1953
                             $sql .= ", libelle";
1954 1954
                             $sql .= ", module";
1955 1955
                             $sql .= ", module_origin";
1956
-                            $sql .= ", type";   // TODO deprecated
1956
+                            $sql .= ", type"; // TODO deprecated
1957 1957
                             $sql .= ", bydefault";
1958 1958
                             $sql .= ", perms";
1959 1959
                             $sql .= ", subperms";
@@ -1964,7 +1964,7 @@  discard block
 block discarded – undo
1964 1964
                             $sql .= ", '" . $this->db->escape($r_label) . "'";
1965 1965
                             $sql .= ", '" . $this->db->escape($r_module) . "'";
1966 1966
                             $sql .= ", '" . $this->db->escape($r_module_origin) . "'";
1967
-                            $sql .= ", '" . $this->db->escape($r_type) . "'";   // TODO deprecated
1967
+                            $sql .= ", '" . $this->db->escape($r_type) . "'"; // TODO deprecated
1968 1968
                             $sql .= ", " . ((int) $r_default);
1969 1969
                             $sql .= ", '" . $this->db->escape($r_perms) . "'";
1970 1970
                             $sql .= ", '" . $this->db->escape($r_subperms) . "'";
@@ -2186,7 +2186,7 @@  discard block
 block discarded – undo
2186 2186
 
2187 2187
         $sql = "DELETE FROM " . MAIN_DB_PREFIX . "menu";
2188 2188
         $sql .= " WHERE module = '" . $this->db->escape($module) . "'";
2189
-        $sql .= " AND menu_handler = 'all'";    // We delete only lines that were added manually or by the module activation. We keep entry added by menuhandler like 'auguria'
2189
+        $sql .= " AND menu_handler = 'all'"; // We delete only lines that were added manually or by the module activation. We keep entry added by menuhandler like 'auguria'
2190 2190
         $sql .= " AND entity IN (0, " . $conf->entity . ")";
2191 2191
 
2192 2192
         dol_syslog(get_class($this) . "::delete_menus", LOG_DEBUG);
@@ -2570,36 +2570,36 @@  discard block
 block discarded – undo
2570 2570
         }
2571 2571
 
2572 2572
         if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) {
2573
-            $versionTitle =  $langs->trans("Version") . ' ' . $this->getVersion(1);
2573
+            $versionTitle = $langs->trans("Version") . ' ' . $this->getVersion(1);
2574 2574
             if ($this->needUpdate) {
2575 2575
                 $versionTitle .= '<br>' . $langs->trans('ModuleUpdateAvailable') . ' : ' . $this->lastVersion;
2576 2576
             }
2577 2577
 
2578
-            $return .=  '<span class="info-box-icon-version' . ($versiontrans ? ' ' . $versiontrans : '') . ' classfortooltip" title="' . dol_escape_js($versionTitle) . '" >';
2579
-            $return .=  $this->getVersion(1);
2580
-            $return .=  '</span>';
2578
+            $return .= '<span class="info-box-icon-version' . ($versiontrans ? ' ' . $versiontrans : '') . ' classfortooltip" title="' . dol_escape_js($versionTitle) . '" >';
2579
+            $return .= $this->getVersion(1);
2580
+            $return .= '</span>';
2581 2581
         }
2582 2582
 
2583
-        $return .=  '</div>
2583
+        $return .= '</div>
2584 2584
 	    <div class="info-box-content info-box-text-module' . (!getDolGlobalString($const_name) ? '' : ' info-box-module-enabled' . ($versiontrans ? ' info-box-content-warning' : '')) . '">
2585 2585
 	    <span class="info-box-title">' . $this->getName() . '</span>
2586 2586
 	    <span class="info-box-desc twolinesmax opacitymedium" title="' . dol_escape_htmltag($this->getDesc()) . '">' . nl2br($this->getDesc()) . '</span>';
2587 2587
 
2588
-        $return .=  '<div class="valignmiddle inline-block info-box-more">';
2588
+        $return .= '<div class="valignmiddle inline-block info-box-more">';
2589 2589
         //if ($versiontrans) print img_warning($langs->trans("Version").' '.$this->getVersion(1)).' ';
2590
-        $return .=  '<a class="valignmiddle inline-block" href="javascript:document_preview(\'' . constant('BASE_URL') . '/admin/modulehelp.php?id=' . ((int) $this->numero) . '\',\'text/html\',\'' . dol_escape_js($langs->trans("Module")) . '\')">' . img_picto(($this->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule") . ' - ' : '') . $langs->trans("ClickToShowDescription"), $imginfo) . '</a>';
2591
-        $return .=  '</div><br>';
2592
-
2593
-        $return .=  '<div class="valignmiddle inline-block info-box-actions">';
2594
-        $return .=  '<div class="valignmiddle inline-block info-box-setup">';
2595
-        $return .=  $codetoconfig;
2596
-        $return .=  '</div>';
2597
-        $return .=  '<div class="valignmiddle inline-block marginleftonly marginrightonly">';
2598
-        $return .=  $codeenabledisable;
2599
-        $return .=  '</div>';
2600
-        $return .=  '</div>';
2601
-
2602
-        $return .=  '
2590
+        $return .= '<a class="valignmiddle inline-block" href="javascript:document_preview(\'' . constant('BASE_URL') . '/admin/modulehelp.php?id=' . ((int) $this->numero) . '\',\'text/html\',\'' . dol_escape_js($langs->trans("Module")) . '\')">' . img_picto(($this->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule") . ' - ' : '') . $langs->trans("ClickToShowDescription"), $imginfo) . '</a>';
2591
+        $return .= '</div><br>';
2592
+
2593
+        $return .= '<div class="valignmiddle inline-block info-box-actions">';
2594
+        $return .= '<div class="valignmiddle inline-block info-box-setup">';
2595
+        $return .= $codetoconfig;
2596
+        $return .= '</div>';
2597
+        $return .= '<div class="valignmiddle inline-block marginleftonly marginrightonly">';
2598
+        $return .= $codeenabledisable;
2599
+        $return .= '</div>';
2600
+        $return .= '</div>';
2601
+
2602
+        $return .= '
2603 2603
 	    </div><!-- /.info-box-content -->
2604 2604
 	    </div><!-- /.info-box -->
2605 2605
 	    </div>';
@@ -2618,7 +2618,7 @@  discard block
 block discarded – undo
2618 2618
     {
2619 2619
         require_once constant('DOL_DOCUMENT_ROOT') . '/core/lib/geturl.lib.php';
2620 2620
         if (!empty($this->url_last_version)) {
2621
-            $lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0);    // Accept http or https links on external remote server only
2621
+            $lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only
2622 2622
             if (isset($lastVersion['content']) && strlen($lastVersion['content']) < 30) {
2623 2623
                 // Security warning :  be careful with remote data content, the module editor could be hacked (or evil) so limit to a-z A-Z 0-9 _ . -
2624 2624
                 $this->lastVersion = preg_replace("/[^a-zA-Z0-9_\.\-]+/", "", $lastVersion['content']);
Please login to merge, or discard this patch.