@@ -81,7 +81,7 @@ |
||
81 | 81 | // Turning on or off the ssl target certificate |
82 | 82 | if ($ssl_verifypeer < 0) { |
83 | 83 | global $dolibarr_main_prod; |
84 | - $ssl_verifypeer = ($dolibarr_main_prod ? true : false); |
|
84 | + $ssl_verifypeer = ($dolibarr_main_prod ? true : false); |
|
85 | 85 | } |
86 | 86 | if (getDolGlobalString('MAIN_CURL_DISABLE_VERIFYPEER')) { |
87 | 87 | $ssl_verifypeer = 0; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $content = preg_replace('/<a href="([^"]+)" target="([^"]+)">([^<]+)<\/a>/', '[\3](\1)', $content); |
40 | 40 | |
41 | 41 | // Replace HTML comments |
42 | - $content = preg_replace('/<!--.*-->/Ums', '', $content); // We remove HTML comment that are not MD comment because they will be escaped and output when setSafeMode is set to true. |
|
42 | + $content = preg_replace('/<!--.*-->/Ums', '', $content); // We remove HTML comment that are not MD comment because they will be escaped and output when setSafeMode is set to true. |
|
43 | 43 | |
44 | 44 | if (is_array($replaceimagepath)) { |
45 | 45 | foreach ($replaceimagepath as $key => $val) { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | if ($parser == 'parsedown') { |
52 | 52 | include_once DOL_DOCUMENT_ROOT . '/includes/parsedown/Parsedown.php'; |
53 | 53 | $parsedown = new Parsedown(); |
54 | - $parsedown->setSafeMode(true); // This will escape HTML link <a href=""> into html entities but markdown links are ok |
|
54 | + $parsedown->setSafeMode(true); // This will escape HTML link <a href=""> into html entities but markdown links are ok |
|
55 | 55 | |
56 | 56 | // Because HTML will be HTML entity encoded, we replace tag we want to keep |
57 | 57 | $content = preg_replace('/<span style="([^"]+)">/', '<!-- SPAN_STYLE_\1 -->', $content); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $nbContacts = $dataretrieved; |
62 | 62 | } else { |
63 | 63 | $nbContacts = count($project->liste_contact(-1, 'internal')) + count($project->liste_contact(-1, 'external')); |
64 | - dol_setcache($cachekey, $nbContacts, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
64 | + dol_setcache($cachekey, $nbContacts, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
65 | 65 | } |
66 | 66 | $head[$h][0] = constant('BASE_URL') . '/projet/contact.php?id=' . ((int) $project->id) . ($moreparam ? '&' . $moreparam : ''); |
67 | 67 | $head[$h][1] = $langs->trans("ProjectContact"); |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | if (isModEnabled("bank")) { |
207 | 207 | $nbElements += $project->getElementCount('variouspayment', 'payment_various'); |
208 | 208 | } |
209 | - dol_setcache($cachekey, $nbElements, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
209 | + dol_setcache($cachekey, $nbElements, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
210 | 210 | } |
211 | 211 | $head[$h][0] = constant('BASE_URL') . '/projet/element.php?id=' . $project->id; |
212 | 212 | $head[$h][1] = $langs->trans("ProjectOverview"); |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | } else { |
254 | 254 | $nbConfOrBooth = count($result); |
255 | 255 | } |
256 | - dol_setcache($cachekey, $nbConfOrBooth, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
256 | + dol_setcache($cachekey, $nbConfOrBooth, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
257 | 257 | } |
258 | 258 | $cachekey = 'count_attendees_' . $project->id; |
259 | 259 | $dataretrieved = dol_getcache($cachekey); |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); |
322 | 322 | $nbLinks = Link::count($db, $project->element, $project->id); |
323 | 323 | $totalAttached = $nbFiles + $nbLinks; |
324 | - dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
324 | + dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
325 | 325 | } |
326 | 326 | $head[$h][0] = constant('BASE_URL') . '/projet/document.php?id=' . $project->id; |
327 | 327 | $head[$h][1] = $langs->trans('Documents'); |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | $nbComments = $dataretrieved; |
343 | 343 | } else { |
344 | 344 | $nbComments = $project->getNbComments(); |
345 | - dol_setcache($cachekey, $nbComments, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
345 | + dol_setcache($cachekey, $nbComments, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
346 | 346 | } |
347 | 347 | $head[$h][0] = constant('BASE_URL') . '/projet/comment.php?id=' . $project->id; |
348 | 348 | $head[$h][1] = $langs->trans("CommentLink"); |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | $taskstatic->label = (!empty($taskrole[$lines[$i]->id]) ? $langs->trans("YourRole") . ': ' . $taskrole[$lines[$i]->id] : ''); |
689 | 689 | $taskstatic->projectstatus = $lines[$i]->projectstatus; |
690 | 690 | $taskstatic->progress = $lines[$i]->progress; |
691 | - $taskstatic->fk_statut = $lines[$i]->status; // deprecated |
|
691 | + $taskstatic->fk_statut = $lines[$i]->status; // deprecated |
|
692 | 692 | $taskstatic->status = $lines[$i]->status; |
693 | 693 | $taskstatic->date_start = $lines[$i]->date_start; |
694 | 694 | $taskstatic->date_end = $lines[$i]->date_end; |
@@ -2104,7 +2104,7 @@ discard block |
||
2104 | 2104 | |
2105 | 2105 | $disabledtaskday = $disabledtask; |
2106 | 2106 | |
2107 | - if (! $disabledtask && $restrictBefore && $tmpday < $restrictBefore) { |
|
2107 | + if (!$disabledtask && $restrictBefore && $tmpday < $restrictBefore) { |
|
2108 | 2108 | $disabledtaskday = 1; |
2109 | 2109 | } |
2110 | 2110 | |
@@ -2388,7 +2388,7 @@ discard block |
||
2388 | 2388 | $j = 0; |
2389 | 2389 | foreach ($TWeek as $weekIndex => $weekNb) { |
2390 | 2390 | $j++; |
2391 | - $weekWorkLoad = !empty($projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id]) ? $projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id] : 0 ; |
|
2391 | + $weekWorkLoad = !empty($projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id]) ? $projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id] : 0; |
|
2392 | 2392 | if (!isset($totalforeachweek[$weekNb])) { |
2393 | 2393 | $totalforeachweek[$weekNb] = 0; |
2394 | 2394 | } |
@@ -2403,7 +2403,7 @@ discard block |
||
2403 | 2403 | $disabledtaskweek = $disabledtask; |
2404 | 2404 | $firstdayofweek = dol_mktime(0, 0, 0, $month, $TFirstDay[$weekIndex], $year); |
2405 | 2405 | |
2406 | - if (! $disabledtask && $restrictBefore && $firstdayofweek < $restrictBefore) { |
|
2406 | + if (!$disabledtask && $restrictBefore && $firstdayofweek < $restrictBefore) { |
|
2407 | 2407 | $disabledtaskweek = 1; |
2408 | 2408 | } |
2409 | 2409 |
@@ -299,7 +299,7 @@ |
||
299 | 299 | if ($out != '') { |
300 | 300 | try { |
301 | 301 | // @phan-suppress-next-line PhanPluginUnsafeEval |
302 | - eval('$array = ' . $out . ';'); // not secured but this is no mode used as php json lib is always expected to be loaded now. |
|
302 | + eval('$array = ' . $out . ';'); // not secured but this is no mode used as php json lib is always expected to be loaded now. |
|
303 | 303 | } catch (Exception $e) { |
304 | 304 | $array = array(); |
305 | 305 | } |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | if (dol_is_file($filetpl)) { |
153 | 153 | if ($backupold) { |
154 | 154 | $result = archiveOrBackupFile($filetpl); |
155 | - if (! $result) { |
|
155 | + if (!$result) { |
|
156 | 156 | return false; |
157 | 157 | } |
158 | 158 | } else { |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | $indexcontent .= " require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n"; |
357 | 357 | $indexcontent .= ' redirectToContainer($_GET[\'pageref\'], $_GET[\'pagealiasalt\'], $_GET[\'pageid\']);' . "\n"; |
358 | 358 | $indexcontent .= "}\n"; |
359 | - $indexcontent .= "include_once '" . $relpath . "/" . basename($filetpl) . "'\n"; // use .. instead of . |
|
359 | + $indexcontent .= "include_once '" . $relpath . "/" . basename($filetpl) . "'\n"; // use .. instead of . |
|
360 | 360 | $indexcontent .= '// END PHP ?>' . "\n"; |
361 | 361 | $result = file_put_contents($fileindexsub, $indexcontent); |
362 | 362 | if ($result === false) { |
@@ -185,7 +185,7 @@ |
||
185 | 185 | |
186 | 186 | $newtimeyear = (int) dol_print_date($newtime, '%Y'); |
187 | 187 | $newtimemonth = (int) dol_print_date($newtime, '%m'); |
188 | - $newtimetotalmonths = (($newtimeyear * 12) + $newtimemonth); |
|
188 | + $newtimetotalmonths = (($newtimeyear * 12) + $newtimemonth); |
|
189 | 189 | |
190 | 190 | if ($monthsexpected < $newtimetotalmonths) { |
191 | 191 | $newtimehours = (int) dol_print_date($newtime, '%H'); |
@@ -249,7 +249,7 @@ |
||
249 | 249 | $sql .= ' p.description as product_desc'; |
250 | 250 | $sql .= " FROM " . MAIN_DB_PREFIX . "expeditiondet as ed,"; |
251 | 251 | $sql .= " " . MAIN_DB_PREFIX . "expedition as e,"; |
252 | - $sql .= " " . MAIN_DB_PREFIX . $origin . "det as obj"; // for example llx_commandedet |
|
252 | + $sql .= " " . MAIN_DB_PREFIX . $origin . "det as obj"; // for example llx_commandedet |
|
253 | 253 | $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON obj.fk_product = p.rowid"; |
254 | 254 | //TODO Add link to expeditiondet_batch |
255 | 255 | $sql .= " WHERE e.entity IN (" . getEntity('expedition') . ")"; |
@@ -178,10 +178,10 @@ |
||
178 | 178 | $dispachedLines = $object->getDispachedLines(1); |
179 | 179 | $nbDispachedLines = count($dispachedLines); |
180 | 180 | |
181 | - for ($line = 0 ; $line < $nbDispachedLines; $line++) { |
|
181 | + for ($line = 0; $line < $nbDispachedLines; $line++) { |
|
182 | 182 | $sumQtyAllreadyDispatched = $sumQtyAllreadyDispatched + $dispachedLines[$line]['qty']; |
183 | 183 | } |
184 | - for ($line = 0 ; $line < $nbLinesOrdered; $line++) { |
|
184 | + for ($line = 0; $line < $nbLinesOrdered; $line++) { |
|
185 | 185 | //If line is a product of conf to manage stocks for services |
186 | 186 | if ($object->lines[$line]->product_type == 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { |
187 | 187 | $sumQtyOrdered = $sumQtyOrdered + $object->lines[$line]->qty; |
@@ -118,13 +118,13 @@ |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | /** |
121 | - * Return array head with list of tabs to view object information |
|
122 | - * |
|
123 | - * @param BonPrelevement $object Member |
|
124 | - * @param int $nbOfInvoices No of invoices |
|
125 | - * @param int $nbOfSalaryInvoice No of salary invoices |
|
126 | - * @return array head |
|
127 | - */ |
|
121 | + * Return array head with list of tabs to view object information |
|
122 | + * |
|
123 | + * @param BonPrelevement $object Member |
|
124 | + * @param int $nbOfInvoices No of invoices |
|
125 | + * @param int $nbOfSalaryInvoice No of salary invoices |
|
126 | + * @return array head |
|
127 | + */ |
|
128 | 128 | function bon_prelevement_prepare_head(BonPrelevement $object, $nbOfInvoices, $nbOfSalaryInvoice) |
129 | 129 | { |
130 | 130 | global $langs, $conf; |