Passed
Push — GENERAL_BUG_REVIEW_240911 ( 3362b2...8cbbee )
by Rafael
49:13
created
public/htdocs/core/ajax/box.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 
46 46
 $boxid = GETPOSTINT('boxid');
47 47
 $boxorder = GETPOST('boxorder');
48
-$zone = GETPOST('zone');        // Can be '0' or '1' or 'pagename'...
48
+$zone = GETPOST('zone'); // Can be '0' or '1' or 'pagename'...
49 49
 $userid = GETPOSTINT('userid');
50 50
 
51 51
 // Security check
Please login to merge, or discard this patch.
public/htdocs/core/ajax/selectobject.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,9 +93,9 @@
 block discarded – undo
93 93
     $vartmp = (empty($InfoFieldList[3]) ? '' : $InfoFieldList[3]);
94 94
     $reg = array();
95 95
     if (preg_match('/^.*:(\w*)$/', $vartmp, $reg)) {
96
-        $InfoFieldList[4] = $reg[1];    // take the sort field
96
+        $InfoFieldList[4] = $reg[1]; // take the sort field
97 97
     }
98
-    $InfoFieldList[3] = preg_replace('/:\w*$/', '', $vartmp);    // take the filter field
98
+    $InfoFieldList[3] = preg_replace('/:\w*$/', '', $vartmp); // take the filter field
99 99
 
100 100
     $classname = $InfoFieldList[0];
101 101
     $classpath = $InfoFieldList[1];
Please login to merge, or discard this patch.
public/htdocs/core/ajax/fetchKnowledgeRecord.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
         $response = array();
95 95
         while ($i < $num) {
96 96
             $obj = $db->fetch_object($resql);
97
-            $response[] = array('title' => $obj->question,'ref' => $obj->ref,'answer' => dol_escape_htmltag(preg_replace('/\\r|\\r\\n|\\n/', "", $obj->answer)),'url' => $obj->url);
97
+            $response[] = array('title' => $obj->question, 'ref' => $obj->ref, 'answer' => dol_escape_htmltag(preg_replace('/\\r|\\r\\n|\\n/', "", $obj->answer)), 'url' => $obj->url);
98 98
             $i++;
99 99
         }
100 100
     } else {
Please login to merge, or discard this patch.
public/htdocs/core/ajax/ajaxinvoiceline.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
     $formProject = new FormProjets($db);
61 61
 
62 62
 
63
-    $return['value']    = $formProject->selectInvoiceAndLine($invoice_id, 0, 'invoiceid', 'invoicelineid', 'maxwidth500', array(), 1);
63
+    $return['value'] = $formProject->selectInvoiceAndLine($invoice_id, 0, 'invoiceid', 'invoicelineid', 'maxwidth500', array(), 1);
64 64
     //$return['num'] = $form->num;
65 65
     //$return['error']  = $form->error;
66 66
 }
Please login to merge, or discard this patch.
public/htdocs/core/ajax/flowjs-server.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
 $flowChunkSize = GETPOST('flowChunkSize', 'alpha');
59 59
 $flowTotalSize = GETPOST('flowTotalSize', 'alpha');
60 60
 
61
-$result = restrictedArea($user, $module, 0, '', 0, 'fk_soc', 'rowid', 0, 1);    // Call with mode return
61
+$result = restrictedArea($user, $module, 0, '', 0, 'fk_soc', 'rowid', 0, 1); // Call with mode return
62 62
 
63 63
 if ($action != 'upload') {
64 64
     httponly_accessforbidden("Param action must be 'upload'");
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
     // check that all the parts are present
165 165
     // the size of the last part is between chunkSize and 2*$chunkSize
166
-    if ($total_files * (float) $chunkSize >=  ((float) $totalSize - (float) $chunkSize + 1)) {
166
+    if ($total_files * (float) $chunkSize >= ((float) $totalSize - (float) $chunkSize + 1)) {
167 167
         // create the final destination file
168 168
         if (($fp = fopen($upload_dir . '/' . $fileName, 'w')) !== false) {
169 169
             for ($i = 1; $i <= $total_files; $i++) {
Please login to merge, or discard this patch.
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.