@@ -516,9 +516,9 @@ |
||
516 | 516 | } |
517 | 517 | |
518 | 518 | foreach ($lines as $line) { |
519 | - $lineObj =(object) $line; |
|
519 | + $lineObj = (object) $line; |
|
520 | 520 | |
521 | - $result=$this->order->dispatchProduct(DolibarrApiAccess::$user, |
|
521 | + $result = $this->order->dispatchProduct(DolibarrApiAccess::$user, |
|
522 | 522 | $lineObj->fk_product, |
523 | 523 | $lineObj->qty, |
524 | 524 | $lineObj->warehouse, |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | if (empty($price) && !empty($conf->global->PRODUCT_USE_SUB_COST_PRICES_IF_COST_PRICE_EMPTY)) { |
99 | 99 | // get pmp for subproducts if any |
100 | 100 | $producttmp->get_sousproduits_arbo(); |
101 | - $prods_arbo=$producttmp->get_arbo_each_prod(); |
|
101 | + $prods_arbo = $producttmp->get_arbo_each_prod(); |
|
102 | 102 | if (!empty($prods_arbo)) { |
103 | 103 | $price = 0; |
104 | 104 | foreach ($prods_arbo as $child) { |
@@ -109,15 +109,15 @@ discard block |
||
109 | 109 | } |
110 | 110 | } |
111 | 111 | |
112 | - $prices[] = array("id" => 'pmpprice', "price" => price2num($price), "label" => $langs->trans("PMPValueShort").': '.price($price, 0, $langs, 0, 0, -1, $conf->currency), "title" => $langs->trans("PMPValueShort").': '.price($price, 0, $langs, 0, 0, -1, $conf->currency)); // For price field, we must use price2num(), for label or title, price() |
|
112 | + $prices[] = array("id" => 'pmpprice', "price" => price2num($price), "label" => $langs->trans("PMPValueShort").': '.price($price, 0, $langs, 0, 0, -1, $conf->currency), "title" => $langs->trans("PMPValueShort").': '.price($price, 0, $langs, 0, 0, -1, $conf->currency)); // For price field, we must use price2num(), for label or title, price() |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | // Add price for costprice (at end) |
116 | 116 | $price = $producttmp->cost_price; |
117 | - if (empty($price) && ! empty($conf->global->PRODUCT_USE_SUB_COST_PRICES_IF_COST_PRICE_EMPTY)) { |
|
117 | + if (empty($price) && !empty($conf->global->PRODUCT_USE_SUB_COST_PRICES_IF_COST_PRICE_EMPTY)) { |
|
118 | 118 | // get costprice for subproducts if any |
119 | 119 | $producttmp->get_sousproduits_arbo(); |
120 | - $prods_arbo=$producttmp->get_arbo_each_prod(); |
|
120 | + $prods_arbo = $producttmp->get_arbo_each_prod(); |
|
121 | 121 | if (!empty($prods_arbo)) { |
122 | 122 | $price = 0; |
123 | 123 | foreach ($prods_arbo as $child) { |
@@ -80,7 +80,7 @@ |
||
80 | 80 | } else { |
81 | 81 | dol_print_error($db); |
82 | 82 | } |
83 | - dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
83 | + dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
84 | 84 | } |
85 | 85 | $head[$tab][0] = DOL_URL_ROOT.'/contact/project.php?id='.$object->id; |
86 | 86 | $head[$tab][1] = $langs->trans("Projects"); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | // Turning on or off the ssl target certificate |
80 | 80 | if ($ssl_verifypeer < 0) { |
81 | 81 | global $dolibarr_main_prod; |
82 | - $ssl_verifypeer = ($dolibarr_main_prod ? true : false); |
|
82 | + $ssl_verifypeer = ($dolibarr_main_prod ? true : false); |
|
83 | 83 | } |
84 | 84 | if (!empty($conf->global->MAIN_CURL_DISABLE_VERIFYPEER)) { |
85 | 85 | $ssl_verifypeer = 0; |
@@ -230,13 +230,13 @@ discard block |
||
230 | 230 | if ($iptocheck == $ipofmetadataserver) { |
231 | 231 | $info['http_code'] = 400; |
232 | 232 | $info['content'] = 'Error bad hostname IP (Used by '.$nameofmetadataserver.' metadata server). This IP is forbidden.'; |
233 | - break 2; // exit the foreach and the do... |
|
233 | + break 2; // exit the foreach and the do... |
|
234 | 234 | } |
235 | 235 | } |
236 | 236 | |
237 | 237 | // Set CURLOPT_CONNECT_TO so curl will not try another resolution that may give a different result. Possible only on PHP v7+ |
238 | 238 | if (defined('CURLOPT_CONNECT_TO')) { |
239 | - $connect_to = array(sprintf("%s:%d:%s:%d", $newUrlArray['host'], empty($newUrlArray['port'])?'':$newUrlArray['port'], $iptocheck, empty($newUrlArray['port'])?'':$newUrlArray['port'])); |
|
239 | + $connect_to = array(sprintf("%s:%d:%s:%d", $newUrlArray['host'], empty($newUrlArray['port']) ? '' : $newUrlArray['port'], $iptocheck, empty($newUrlArray['port']) ? '' : $newUrlArray['port'])); |
|
240 | 240 | //var_dump($newUrlArray); |
241 | 241 | //var_dump($connect_to); |
242 | 242 | curl_setopt($ch, CURLOPT_CONNECT_TO, $connect_to); |
@@ -143,7 +143,7 @@ |
||
143 | 143 | if ($val['type'] == 'text' || $val['type'] == 'html') { |
144 | 144 | $rightpart .= ' tdtop'; |
145 | 145 | } |
146 | - $rightpart.= '">'; |
|
146 | + $rightpart .= '">'; |
|
147 | 147 | if (!empty($val['help'])) { |
148 | 148 | $rightpart .= $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help'])); |
149 | 149 | } else { |
@@ -78,19 +78,19 @@ discard block |
||
78 | 78 | |
79 | 79 | $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim(getDolGlobalString($keyforuploaddir)))); |
80 | 80 | foreach ($listofdir as $key => $tmpdir) { |
81 | - $tmpdir = preg_replace('/DOL_DATA_ROOT\/*/', '', $tmpdir); // Clean string if we found a hardcoded DOL_DATA_ROOT |
|
81 | + $tmpdir = preg_replace('/DOL_DATA_ROOT\/*/', '', $tmpdir); // Clean string if we found a hardcoded DOL_DATA_ROOT |
|
82 | 82 | if (!$tmpdir) { |
83 | 83 | unset($listofdir[$key]); |
84 | 84 | continue; |
85 | 85 | } |
86 | - $tmpdir = DOL_DATA_ROOT.'/'.$tmpdir; // Complete with DOL_DATA_ROOT. Only files into DOL_DATA_ROOT can be reach/set |
|
86 | + $tmpdir = DOL_DATA_ROOT.'/'.$tmpdir; // Complete with DOL_DATA_ROOT. Only files into DOL_DATA_ROOT can be reach/set |
|
87 | 87 | if (!is_dir($tmpdir)) { |
88 | 88 | if (empty($nomessageinsetmoduleoptions)) { |
89 | 89 | setEventMessages($langs->trans("ErrorDirNotFound", $tmpdir), null, 'warnings'); |
90 | 90 | } |
91 | 91 | } else { |
92 | 92 | $upload_dir = $tmpdir; |
93 | - break; // So we take the first directory found into setup $conf->global->$keyforuploaddir |
|
93 | + break; // So we take the first directory found into setup $conf->global->$keyforuploaddir |
|
94 | 94 | } |
95 | 95 | } |
96 | 96 | |
@@ -129,19 +129,19 @@ discard block |
||
129 | 129 | $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim(getDolGlobalString($keyforuploaddir)))); |
130 | 130 | foreach ($listofdir as $key => $tmpdir) { |
131 | 131 | $tmpdir = trim($tmpdir); |
132 | - $tmpdir = preg_replace('/DOL_DATA_ROOT\/*/', '', $tmpdir); // Clean string if we found a hardcoded DOL_DATA_ROOT |
|
132 | + $tmpdir = preg_replace('/DOL_DATA_ROOT\/*/', '', $tmpdir); // Clean string if we found a hardcoded DOL_DATA_ROOT |
|
133 | 133 | if (!$tmpdir) { |
134 | 134 | unset($listofdir[$key]); |
135 | 135 | continue; |
136 | 136 | } |
137 | - $tmpdir = DOL_DATA_ROOT.'/'.$tmpdir; // Complete with DOL_DATA_ROOT. Only files into DOL_DATA_ROOT can be reach/set |
|
137 | + $tmpdir = DOL_DATA_ROOT.'/'.$tmpdir; // Complete with DOL_DATA_ROOT. Only files into DOL_DATA_ROOT can be reach/set |
|
138 | 138 | if (!is_dir($tmpdir)) { |
139 | 139 | if (empty($nomessageinsetmoduleoptions)) { |
140 | 140 | setEventMessages($langs->trans("ErrorDirNotFound", $tmpdir), null, 'warnings'); |
141 | 141 | } |
142 | 142 | } else { |
143 | 143 | $upload_dir = $tmpdir; |
144 | - break; // So we take the first directory found into setup $conf->global->$keyforuploaddir |
|
144 | + break; // So we take the first directory found into setup $conf->global->$keyforuploaddir |
|
145 | 145 | } |
146 | 146 | } |
147 | 147 | if ($upload_dir) { |
@@ -493,7 +493,7 @@ |
||
493 | 493 | $this->subscription = $obj->subscription; |
494 | 494 | $this->amount = $obj->amount; |
495 | 495 | $this->mail_valid = $obj->mail_valid; |
496 | - $this->note = $obj->note_public; // deprecated |
|
496 | + $this->note = $obj->note_public; // deprecated |
|
497 | 497 | $this->note_public = $obj->note_public; |
498 | 498 | $this->vote = $obj->vote; |
499 | 499 |
@@ -235,7 +235,7 @@ |
||
235 | 235 | $this->dateh = $this->db->jdate($obj->dateh); |
236 | 236 | $this->datef = $this->db->jdate($obj->datef); |
237 | 237 | $this->amount = $obj->subscription; |
238 | - $this->note = $obj->note_public; // deprecated |
|
238 | + $this->note = $obj->note_public; // deprecated |
|
239 | 239 | $this->note_public = $obj->note_public; |
240 | 240 | $this->fk_bank = $obj->fk_bank; |
241 | 241 | return 1; |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | $action = GETPOST('action', 'aZ09'); |
48 | 48 | $value = GETPOST('value', 'alpha'); |
49 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
49 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
50 | 50 | |
51 | 51 | $label = GETPOST('label', 'alpha'); |
52 | 52 | $scandir = GETPOST('scan_dir', 'alpha'); |