@@ -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 |
@@ -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 |
@@ -23,8 +23,8 @@ |
||
23 | 23 | * \brief List of PHP sessions |
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 |
@@ -44,7 +44,7 @@ |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | // Load translation files required by the page |
47 | -$langs->loadLangs(array("companies", "admin", "users", "other","withdrawals")); |
|
47 | +$langs->loadLangs(array("companies", "admin", "users", "other", "withdrawals")); |
|
48 | 48 | |
49 | 49 | // Load variable for pagination |
50 | 50 | $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; |
@@ -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 |
@@ -44,7 +44,7 @@ |
||
44 | 44 | |
45 | 45 | $action = GETPOST('action', 'aZ09'); |
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 | $param = GETPOST('param', 'alpha'); |
50 | 50 | $cancel = GETPOST('cancel', 'alpha'); |
@@ -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 | } |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | } |
199 | 199 | } |
200 | 200 | |
201 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
201 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
202 | 202 | /** |
203 | 203 | * Return tree of Dolistore categories. $this->categories must have been loaded before. |
204 | 204 | * |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | */ |
208 | 208 | public function get_categories($parent = 0) |
209 | 209 | { |
210 | - // phpcs:enable |
|
210 | + // phpcs:enable |
|
211 | 211 | if (!isset($this->categories)) { |
212 | 212 | die('not possible'); |
213 | 213 | } |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | } |
246 | 246 | } |
247 | 247 | |
248 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
248 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
249 | 249 | /** |
250 | 250 | * Return list of product formatted for output |
251 | 251 | * |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | */ |
254 | 254 | public function get_products() |
255 | 255 | { |
256 | - // phpcs:enable |
|
256 | + // phpcs:enable |
|
257 | 257 | global $langs, $conf; |
258 | 258 | $html = ""; |
259 | 259 | $last_month = time() - (30 * 24 * 60 * 60); |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | return $html; |
343 | 343 | } |
344 | 344 | |
345 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
345 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
346 | 346 | /** |
347 | 347 | * get previous link |
348 | 348 | * |
@@ -351,11 +351,11 @@ discard block |
||
351 | 351 | */ |
352 | 352 | public function get_previous_link($text = '<<') |
353 | 353 | { |
354 | - // phpcs:enable |
|
354 | + // phpcs:enable |
|
355 | 355 | return '<a href="' . $this->get_previous_url() . '" class="button">' . dol_escape_htmltag($text) . '</a>'; |
356 | 356 | } |
357 | 357 | |
358 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
358 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
359 | 359 | /** |
360 | 360 | * get next link |
361 | 361 | * |
@@ -364,11 +364,11 @@ discard block |
||
364 | 364 | */ |
365 | 365 | public function get_next_link($text = '>>') |
366 | 366 | { |
367 | - // phpcs:enable |
|
367 | + // phpcs:enable |
|
368 | 368 | return '<a href="' . $this->get_next_url() . '" class="button">' . dol_escape_htmltag($text) . '</a>'; |
369 | 369 | } |
370 | 370 | |
371 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
371 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
372 | 372 | /** |
373 | 373 | * get previous url |
374 | 374 | * |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | */ |
377 | 377 | public function get_previous_url() |
378 | 378 | { |
379 | - // phpcs:enable |
|
379 | + // phpcs:enable |
|
380 | 380 | $param_array = array(); |
381 | 381 | if ($this->start < $this->per_page) { |
382 | 382 | $sub = 0; |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | return $this->url . "&" . $param; |
393 | 393 | } |
394 | 394 | |
395 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
395 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
396 | 396 | /** |
397 | 397 | * get next url |
398 | 398 | * |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | */ |
401 | 401 | public function get_next_url() |
402 | 402 | { |
403 | - // phpcs:enable |
|
403 | + // phpcs:enable |
|
404 | 404 | $param_array = array(); |
405 | 405 | if (count($this->products) < $this->per_page) { |
406 | 406 | $add = 0; |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | return $this->url . "&" . $param; |
417 | 417 | } |
418 | 418 | |
419 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
419 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
420 | 420 | /** |
421 | 421 | * version compare |
422 | 422 | * |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | */ |
427 | 427 | public function version_compare($v1, $v2) |
428 | 428 | { |
429 | - // phpcs:enable |
|
429 | + // phpcs:enable |
|
430 | 430 | $v1 = explode('.', $v1); |
431 | 431 | $v2 = explode('.', $v2); |
432 | 432 | $ret = 0; |
@@ -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 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | |
43 | 43 | $action = GETPOST('action', 'aZ09'); |
44 | 44 | $backtopage = GETPOST('backtopage', 'alpha'); |
45 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
45 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
46 | 46 | |
47 | 47 | $value = GETPOST('value', 'alpha'); |
48 | 48 | $label = GETPOST('label', 'alpha'); |