@@ -44,7 +44,7 @@ |
||
44 | 44 | |
45 | 45 | $type = GETPOST('type', 'alpha'); |
46 | 46 | $value = GETPOST('value', 'alpha'); |
47 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
47 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
48 | 48 | |
49 | 49 | $label = GETPOST('label', 'alpha'); |
50 | 50 | $scandir = GETPOST('scan_dir', 'alpha'); |
@@ -23,8 +23,8 @@ |
||
23 | 23 | * \brief Page to import database |
24 | 24 | */ |
25 | 25 | |
26 | -if (! defined('CSRFCHECK_WITH_TOKEN')) { |
|
27 | - define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET |
|
26 | +if (!defined('CSRFCHECK_WITH_TOKEN')) { |
|
27 | + define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | // Load Dolibarr environment |
@@ -24,8 +24,8 @@ |
||
24 | 24 | * \brief Page to export documents into a compressed file |
25 | 25 | */ |
26 | 26 | |
27 | -if (! defined('CSRFCHECK_WITH_TOKEN')) { |
|
28 | - define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET |
|
27 | +if (!defined('CSRFCHECK_WITH_TOKEN')) { |
|
28 | + define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | // Load Dolibarr environment |
@@ -23,8 +23,8 @@ |
||
23 | 23 | * \brief Page to make a Dolibarr online upgrade |
24 | 24 | */ |
25 | 25 | |
26 | -if (! defined('CSRFCHECK_WITH_TOKEN')) { |
|
27 | - define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET |
|
26 | +if (!defined('CSRFCHECK_WITH_TOKEN')) { |
|
27 | + define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | // Load Dolibarr environment |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | $tabcond[27] = isModEnabled("societe"); |
521 | 521 | $tabcond[28] = isModEnabled('holiday'); |
522 | 522 | $tabcond[29] = isModEnabled('project'); |
523 | -$tabcond[30] = (isModEnabled('label') || isModEnabled('barcode') || isModEnabled('member')); // stickers format dictionary |
|
523 | +$tabcond[30] = (isModEnabled('label') || isModEnabled('barcode') || isModEnabled('member')); // stickers format dictionary |
|
524 | 524 | $tabcond[31] = ((isModEnabled('invoice') || isModEnabled('supplier_invoice')) && $mysoc->country_code == 'GR'); |
525 | 525 | $tabcond[32] = (isModEnabled('holiday') || isModEnabled('hrm')); |
526 | 526 | $tabcond[33] = isModEnabled('hrm'); |
@@ -2750,7 +2750,7 @@ discard block |
||
2750 | 2750 | print '</td>'; |
2751 | 2751 | } elseif ($value == 'type_duration') { |
2752 | 2752 | print '<td>'; |
2753 | - print $form->selectTypeDuration('', (empty($obj->type_duration) ? '' : $obj->type_duration), array('i','h')); |
|
2753 | + print $form->selectTypeDuration('', (empty($obj->type_duration) ? '' : $obj->type_duration), array('i', 'h')); |
|
2754 | 2754 | print '</td>'; |
2755 | 2755 | } else { |
2756 | 2756 | $fieldValue = isset($obj->{$value}) ? $obj->{$value} : ''; |
@@ -324,12 +324,12 @@ |
||
324 | 324 | //output template |
325 | 325 | $html .= '<tr class="app oddeven ' . dol_escape_htmltag($compatible) . '">'; |
326 | 326 | $html .= '<td class="center" width="210"><div class="newAppParent">'; |
327 | - $html .= $newapp . $images; // No dol_escape_htmltag, it is already escape html |
|
327 | + $html .= $newapp . $images; // No dol_escape_htmltag, it is already escape html |
|
328 | 328 | $html .= '</div></td>'; |
329 | 329 | $html .= '<td class="margeCote"><h2 class="appTitle">'; |
330 | 330 | $html .= dol_escape_htmltag($product->name->language[$this->lang - 1]); |
331 | 331 | $html .= '<br><small>'; |
332 | - $html .= $version; // No dol_escape_htmltag, it is already escape html |
|
332 | + $html .= $version; // No dol_escape_htmltag, it is already escape html |
|
333 | 333 | $html .= '</small></h2>'; |
334 | 334 | $html .= '<small> ' . dol_print_date(dol_stringtotime($product->date_upd), 'dayhour') . ' - ' . $langs->trans('Ref') . ': ' . dol_escape_htmltag($product->reference) . ' - ' . dol_escape_htmltag($langs->trans('Id')) . ': ' . ((int) $product->id) . '</small><br><br>' . dol_escape_htmltag($product->description_short->language[$this->lang - 1]) . '</td>'; |
335 | 335 | // do not load if display none |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | |
402 | 402 | $request = $this->executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'GET')); |
403 | 403 | |
404 | - $this->checkStatusCode($request);// check the response validity |
|
404 | + $this->checkStatusCode($request); // check the response validity |
|
405 | 405 | |
406 | 406 | return $this->parseXML($request['response']); |
407 | 407 | } |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | throw new PrestaShopWebserviceException('Bad parameters given'); |
441 | 441 | } |
442 | 442 | $request = $this->executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'HEAD', CURLOPT_NOBODY => true)); |
443 | - $this->checkStatusCode($request);// check the response validity |
|
443 | + $this->checkStatusCode($request); // check the response validity |
|
444 | 444 | return $request['header']; |
445 | 445 | } |
446 | 446 | |
@@ -463,8 +463,7 @@ discard block |
||
463 | 463 | if (isset($options['url'])) { |
464 | 464 | $url = $options['url']; |
465 | 465 | } elseif ((isset($options['resource'], $options['id']) || isset($options['url'])) && $options['putXml']) { |
466 | - $url = (isset($options['url']) ? $options['url'] : |
|
467 | - $this->url . '/api/' . $options['resource'] . '/' . $options['id']); |
|
466 | + $url = (isset($options['url']) ? $options['url'] : $this->url . '/api/' . $options['resource'] . '/' . $options['id']); |
|
468 | 467 | $xml = $options['putXml']; |
469 | 468 | if (isset($options['id_shop'])) { |
470 | 469 | $url .= '&id_shop=' . $options['id_shop']; |
@@ -477,7 +476,7 @@ discard block |
||
477 | 476 | } |
478 | 477 | |
479 | 478 | $request = $this->executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_POSTFIELDS => $xml)); |
480 | - $this->checkStatusCode($request);// check the response validity |
|
479 | + $this->checkStatusCode($request); // check the response validity |
|
481 | 480 | return $this->parseXML($request['response']); |
482 | 481 | } |
483 | 482 | |
@@ -528,7 +527,7 @@ discard block |
||
528 | 527 | } |
529 | 528 | |
530 | 529 | $request = $this->executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'DELETE')); |
531 | - $this->checkStatusCode($request);// check the response validity |
|
530 | + $this->checkStatusCode($request); // check the response validity |
|
532 | 531 | return true; |
533 | 532 | } |
534 | 533 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $todisabletext = ''; |
141 | 141 | $i = 0; |
142 | 142 | foreach ($arrayoffunctionstodisable as $functiontodisable) { |
143 | - if (! in_array($functiontodisable, $arrayoffunctionsdisabled)) { |
|
143 | + if (!in_array($functiontodisable, $arrayoffunctionsdisabled)) { |
|
144 | 144 | if ($i > 0) { |
145 | 145 | $todisabletext .= ', '; |
146 | 146 | } |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | $todisabletext = ''; |
156 | 156 | $i = 0; |
157 | 157 | foreach ($arrayoffunctionstodisable2 as $functiontodisable) { |
158 | - if (! in_array($functiontodisable, $arrayoffunctionsdisabled)) { |
|
158 | + if (!in_array($functiontodisable, $arrayoffunctionsdisabled)) { |
|
159 | 159 | if ($i > 0) { |
160 | 160 | $todisabletext .= ', '; |
161 | 161 | } |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | print '<br>'; |
231 | 231 | print '<br>'; |
232 | 232 | |
233 | -print '<strong>' . $langs->trans("PermissionsOnFile", $conffile) . '</strong>: '; // $conffile is defined into filefunc.inc.php |
|
233 | +print '<strong>' . $langs->trans("PermissionsOnFile", $conffile) . '</strong>: '; // $conffile is defined into filefunc.inc.php |
|
234 | 234 | $perms = fileperms($dolibarr_main_document_root . '/' . $conffile); |
235 | 235 | if ($perms) { |
236 | 236 | if (($perms & 0x0004) || ($perms & 0x0002)) { |
@@ -476,11 +476,11 @@ discard block |
||
476 | 476 | $umask = getDolGlobalString('MAIN_UMASK'); |
477 | 477 | |
478 | 478 | print '<strong>' . $langs->trans("UMask") . '</strong>: '; |
479 | -if (! in_array($umask, array('600', '660', '0600', '0660'))) { |
|
479 | +if (!in_array($umask, array('600', '660', '0600', '0660'))) { |
|
480 | 480 | print img_warning() . ' '; |
481 | 481 | } |
482 | 482 | print $umask; |
483 | -if (! in_array($umask, array('600', '660', '0600', '0660'))) { |
|
483 | +if (!in_array($umask, array('600', '660', '0600', '0660'))) { |
|
484 | 484 | print ' <span class="opacitymedium">(' . $langs->trans("Recommended") . ': 0600 | 0660)</span>'; |
485 | 485 | } |
486 | 486 | print '<br>'; |
@@ -172,7 +172,7 @@ |
||
172 | 172 | } |
173 | 173 | } |
174 | 174 | if (GETPOST('target') == 'remote') { |
175 | - $xmlarray = getURLContent($xmlremote, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only. Same is used into api_setup.class.php. |
|
175 | + $xmlarray = getURLContent($xmlremote, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only. Same is used into api_setup.class.php. |
|
176 | 176 | |
177 | 177 | // Return array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...) |
178 | 178 | if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '400' && $xmlarray['http_code'] != '404') { |