@@ -68,7 +68,7 @@ |
||
68 | 68 | // Parameters |
69 | 69 | $action = GETPOST('action', 'aZ09'); |
70 | 70 | $backtopage = GETPOST('backtopage', 'alpha'); |
71 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
71 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
72 | 72 | |
73 | 73 | $value = GETPOST('value', 'alpha'); |
74 | 74 | $label = GETPOST('label', 'alpha'); |
@@ -68,7 +68,7 @@ |
||
68 | 68 | // Parameters |
69 | 69 | $action = GETPOST('action', 'aZ09'); |
70 | 70 | $backtopage = GETPOST('backtopage', 'alpha'); |
71 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
71 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
72 | 72 | |
73 | 73 | $value = GETPOST('value', 'alpha'); |
74 | 74 | $label = GETPOST('label', 'alpha'); |
@@ -131,7 +131,7 @@ |
||
131 | 131 | } |
132 | 132 | |
133 | 133 | // Security: Delete string ../ or ..\ into $original_file |
134 | - $original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..' |
|
134 | + $original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..' |
|
135 | 135 | $original_file = str_replace('../', '/', $original_file); |
136 | 136 | $original_file = str_replace('..\\', '/', $original_file); |
137 | 137 |
@@ -21,11 +21,11 @@ |
||
21 | 21 | use Dolibarr\Code\WebPortal\Classes\Context; |
22 | 22 | use Dolibarr\Code\WebPortal\Classes\Controller; |
23 | 23 | |
24 | - /** |
|
25 | - * \file htdocs/webportal/controllers/document.controller.class.php |
|
26 | - * \ingroup webportal |
|
27 | - * \brief This file is a controller for documents |
|
28 | - */ |
|
24 | + /** |
|
25 | + * \file htdocs/webportal/controllers/document.controller.class.php |
|
26 | + * \ingroup webportal |
|
27 | + * \brief This file is a controller for documents |
|
28 | + */ |
|
29 | 29 | |
30 | 30 | require_once constant('DOL_DOCUMENT_ROOT') . '/core/lib/files.lib.php'; |
31 | 31 |
@@ -693,7 +693,7 @@ |
||
693 | 693 | $maxfilesizearray = getMaxFileSizeArray(); |
694 | 694 | $maxmin = $maxfilesizearray['maxmin']; |
695 | 695 | if ($maxmin > 0) { |
696 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
696 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
697 | 697 | } |
698 | 698 | print '<input type="file" class="flat maxwidthinputfileonsmartphone" name="imagebackground" id="imagebackground"' . $disabled . '>'; |
699 | 699 | if ($disabled) { |
@@ -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 | } |
@@ -128,7 +128,7 @@ |
||
128 | 128 | $error++; |
129 | 129 | } |
130 | 130 | } else { |
131 | - $error = -1; // -1 means a warning message |
|
131 | + $error = -1; // -1 means a warning message |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | if ($error == 0) { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $provider . '_NAME', |
157 | 157 | $provider . '_ID', |
158 | 158 | $provider . '_SECRET', |
159 | - $provider . '_URLAUTHORIZE', // For custom oauth links |
|
159 | + $provider . '_URLAUTHORIZE', // For custom oauth links |
|
160 | 160 | $provider . '_SCOPE' // For custom oauth links |
161 | 161 | ); |
162 | 162 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | if (!empty($listinsetup)) { |
169 | 169 | foreach ($listinsetup as $key) { |
170 | 170 | $supported = 0; |
171 | - $keyforsupportedoauth2array = $key[0]; // May be OAUTH_GOOGLE_NAME or OAUTH_GOOGLE_xxx_NAME |
|
171 | + $keyforsupportedoauth2array = $key[0]; // May be OAUTH_GOOGLE_NAME or OAUTH_GOOGLE_xxx_NAME |
|
172 | 172 | $keyforsupportedoauth2array = preg_replace('/^OAUTH_/', '', $keyforsupportedoauth2array); |
173 | 173 | $keyforsupportedoauth2array = preg_replace('/_NAME$/', '', $keyforsupportedoauth2array); |
174 | 174 | if (preg_match('/^.*-/', $keyforsupportedoauth2array)) { |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | if (getDolGlobalString($key[4])) { |
189 | 189 | $shortscope = getDolGlobalString($key[4]); |
190 | 190 | } |
191 | - $state = $shortscope; // TODO USe a better state |
|
191 | + $state = $shortscope; // TODO USe a better state |
|
192 | 192 | |
193 | 193 | // Define $urltorenew, $urltodelete, $urltocheckperms |
194 | 194 | if ($keyforsupportedoauth2array == 'OAUTH_GITHUB_NAME') { |
@@ -43,7 +43,7 @@ |
||
43 | 43 | |
44 | 44 | $action = GETPOST('action', 'aZ09'); |
45 | 45 | $value = GETPOST('value', 'alpha'); |
46 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
46 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
47 | 47 | |
48 | 48 | |
49 | 49 | /* |
@@ -54,10 +54,10 @@ discard block |
||
54 | 54 | while ($i < $num) { |
55 | 55 | $row = $db->fetch_row($resql); |
56 | 56 | if ($row[0] == $field) { |
57 | - $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " CHARACTER SET utf8"; // We must not sanitize the $row[1] |
|
57 | + $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " CHARACTER SET utf8"; // We must not sanitize the $row[1] |
|
58 | 58 | $db->query($sql); |
59 | 59 | |
60 | - $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " COLLATE utf8_unicode_ci"; // We must not sanitize the $row[1] |
|
60 | + $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " COLLATE utf8_unicode_ci"; // We must not sanitize the $row[1] |
|
61 | 61 | $db->query($sql); |
62 | 62 | |
63 | 63 | break; |
@@ -75,10 +75,10 @@ discard block |
||
75 | 75 | while ($i < $num) { |
76 | 76 | $row = $db->fetch_row($resql); |
77 | 77 | if ($row[0] == $field) { |
78 | - $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " CHARACTER SET utf8mb4"; // We must not sanitize the $row[1] |
|
78 | + $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " CHARACTER SET utf8mb4"; // We must not sanitize the $row[1] |
|
79 | 79 | $db->query($sql); |
80 | 80 | |
81 | - $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " COLLATE utf8mb4_unicode_ci"; // We must not sanitize the $row[1] |
|
81 | + $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " COLLATE utf8mb4_unicode_ci"; // We must not sanitize the $row[1] |
|
82 | 82 | $db->query($sql); |
83 | 83 | |
84 | 84 | break; |