@@ -267,7 +267,7 @@ |
||
267 | 267 | |
268 | 268 | switch ($sErrorMsg) { |
269 | 269 | case '': |
270 | - $sErrorNumber = '0'; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
270 | + $sErrorNumber = '0'; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
271 | 271 | break; |
272 | 272 | case 'Invalid argument': |
273 | 273 | case 'No such file or directory': |
@@ -25,7 +25,7 @@ |
||
25 | 25 | |
26 | 26 | ob_start(); |
27 | 27 | |
28 | -require 'config.inc.php'; // This include the main.inc.php |
|
28 | +require 'config.inc.php'; // This include the main.inc.php |
|
29 | 29 | require 'connector.lib.php'; |
30 | 30 | |
31 | 31 | if (!$Config['Enabled']) { |
@@ -50,7 +50,7 @@ |
||
50 | 50 | case 'sellist': |
51 | 51 | $tmp = ''; |
52 | 52 | $tmpparam = jsonOrUnserialize($obj->param); // $tmp may be array 'options' => array 'c_currencies:code_iso:code_iso' => null |
53 | - if (is_array($tmpparam) && array_key_exists('options', $tmpparam) && $tmpparam['options'] && is_array($tmpparam['options'])) { |
|
53 | + if (is_array($tmpparam) && array_key_exists('options', $tmpparam) && $tmpparam['options'] && is_array($tmpparam['options'])) { |
|
54 | 54 | $tmpkeys = array_keys($tmpparam['options']); |
55 | 55 | $tmp = array_shift($tmpkeys); |
56 | 56 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | $showempty = 0; |
62 | 62 | } |
63 | 63 | |
64 | - $return['value'] = $formProject->selectInvoiceAndLine($invoice_id, 0, 'invoiceid', 'invoicelineid', 'maxwidth500', array(), 1); |
|
64 | + $return['value'] = $formProject->selectInvoiceAndLine($invoice_id, 0, 'invoiceid', 'invoicelineid', 'maxwidth500', array(), 1); |
|
65 | 65 | //$return['num'] = $form->num; |
66 | 66 | //$return['error'] = $form->error; |
67 | 67 |
@@ -94,7 +94,7 @@ |
||
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 { |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $flowChunkSize = GETPOST('flowChunkSize', 'alpha'); |
57 | 57 | $flowTotalSize = GETPOST('flowTotalSize', 'alpha'); |
58 | 58 | |
59 | -$result = restrictedArea($user, $module, 0, '', 0, 'fk_soc', 'rowid', 0, 1); // Call with mode return |
|
59 | +$result = restrictedArea($user, $module, 0, '', 0, 'fk_soc', 'rowid', 0, 1); // Call with mode return |
|
60 | 60 | |
61 | 61 | if ($action != 'upload') { |
62 | 62 | httponly_accessforbidden("Param action must be 'upload'"); |
@@ -163,7 +163,7 @@ discard block |
||
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 * $chunkSize >= ($totalSize - $chunkSize + 1)) { |
|
166 | + if ($total_files * $chunkSize >= ($totalSize - $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++) { |
@@ -93,9 +93,9 @@ |
||
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]; |
@@ -117,7 +117,7 @@ |
||
117 | 117 | if (isModEnabled('supplier_proposal') && !getDolGlobalString('MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED') && $user->hasRight('supplier_proposal', 'lire')) { |
118 | 118 | $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' => DOL_URL_ROOT . '/supplier_proposal/list.php' . ($search_boxvalue ? '?search_all=' . urlencode($search_boxvalue) : '')); |
119 | 119 | } |
120 | -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')) { |
|
120 | +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 | 121 | $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' => DOL_URL_ROOT . '/fourn/commande/list.php' . ($search_boxvalue ? '?search_all=' . urlencode($search_boxvalue) : '')); |
122 | 122 | } |
123 | 123 | if (((isModEnabled('fournisseur') && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'facture', 'lire')) || (isModEnabled('supplier_invoice') && $user->hasRight('supplier_invoice', 'lire'))) && !getDolGlobalString('MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED')) { |
@@ -54,7 +54,7 @@ discard block |
||
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 |
||
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 |
||
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 |