@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | { |
82 | 82 | $str = str_replace('<?=', '<?php', $str); |
83 | 83 | $str = str_replace('<?php', '__LTINTPHP__', $str); |
84 | - $str = str_replace('<?', '<?php', $str); // replace the short_open_tag. It is recommended to set this is Off in php.ini |
|
84 | + $str = str_replace('<?', '<?php', $str); // replace the short_open_tag. It is recommended to set this is Off in php.ini |
|
85 | 85 | $str = str_replace('__LTINTPHP__', '<?php', $str); |
86 | 86 | |
87 | 87 | $newstr = ''; |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | $sql .= " WHERE rowid = " . ((int) $websiteid); |
471 | 471 | |
472 | 472 | $resql = $db->query($sql); |
473 | - if (! $resql) { |
|
473 | + if (!$resql) { |
|
474 | 474 | return -1; |
475 | 475 | } |
476 | 476 | } |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | unset($tmpwebsitepage); |
558 | 558 | } |
559 | 559 | if ($result > 0) { |
560 | - $currenturi = $_SERVER["REQUEST_URI"]; // Example: /public/website/index.php?website=mywebsite.com&pageref=mywebsite-home&nocache=1708177483 |
|
560 | + $currenturi = $_SERVER["REQUEST_URI"]; // Example: /public/website/index.php?website=mywebsite.com&pageref=mywebsite-home&nocache=1708177483 |
|
561 | 561 | $regtmp = array(); |
562 | 562 | if (preg_match('/&pageref=([^&]+)/', $currenturi, $regtmp)) { |
563 | 563 | if ($regtmp[0] == $containerref) { |
@@ -1009,9 +1009,9 @@ discard block |
||
1009 | 1009 | $sql = "SELECT COUNT(rowid) as nb"; |
1010 | 1010 | $sql .= " FROM " . MAIN_DB_PREFIX . "ecm_files"; |
1011 | 1011 | $sql .= " WHERE entity IN (" . getEntity($object->element) . ")"; |
1012 | - $sql .= " AND src_object_type = '" . $db->escape($object->element) . "' AND src_object_id = " . ((int) $object->id); // Filter on object |
|
1012 | + $sql .= " AND src_object_type = '" . $db->escape($object->element) . "' AND src_object_id = " . ((int) $object->id); // Filter on object |
|
1013 | 1013 | $sql .= " AND " . $db->regexpsql('filename', $regexforimg, 1); |
1014 | - $sql .= " AND share IS NOT NULL"; // Only image that are public |
|
1014 | + $sql .= " AND share IS NOT NULL"; // Only image that are public |
|
1015 | 1015 | |
1016 | 1016 | $resql = $db->query($sql); |
1017 | 1017 | if ($resql) { |
@@ -1046,7 +1046,7 @@ discard block |
||
1046 | 1046 | $sql = "SELECT rowid, ref, share, filename, cover, position"; |
1047 | 1047 | $sql .= " FROM " . MAIN_DB_PREFIX . "ecm_files"; |
1048 | 1048 | $sql .= " WHERE entity IN (" . getEntity($object->element) . ")"; |
1049 | - $sql .= " AND src_object_type = '" . $db->escape($object->element) . "' AND src_object_id = " . ((int) $object->id); // Filter on object |
|
1049 | + $sql .= " AND src_object_type = '" . $db->escape($object->element) . "' AND src_object_id = " . ((int) $object->id); // Filter on object |
|
1050 | 1050 | $sql .= " AND " . $db->regexpsql('filename', $regexforimg, 1); |
1051 | 1051 | $sql .= $db->order("cover,position,rowid", "ASC,ASC,ASC"); |
1052 | 1052 |
@@ -213,7 +213,7 @@ |
||
213 | 213 | } else { |
214 | 214 | dol_syslog('Failed to count actioncomm ' . $db->lasterror(), LOG_ERR); |
215 | 215 | } |
216 | - dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
216 | + dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
217 | 217 | } |
218 | 218 | |
219 | 219 | $head[$h][1] .= '/'; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | } else { |
86 | 86 | dol_print_error($db); |
87 | 87 | } |
88 | - dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
88 | + dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
89 | 89 | } |
90 | 90 | $head[$tab][0] = constant('BASE_URL') . '/contact/project.php?id=' . $object->id; |
91 | 91 | $head[$tab][1] = $langs->trans("Projects"); |
@@ -144,7 +144,7 @@ |
||
144 | 144 | } else { |
145 | 145 | dol_syslog('Failed to count actioncomm ' . $db->lasterror(), LOG_ERR); |
146 | 146 | } |
147 | - dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
147 | + dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | $head[$h][1] .= '/'; |
@@ -144,7 +144,7 @@ |
||
144 | 144 | } else { |
145 | 145 | dol_syslog('Failed to count actioncomm ' . $db->lasterror(), LOG_ERR); |
146 | 146 | } |
147 | - dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
147 | + dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | $head[$h][1] .= '/'; |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | // Load translation files required by the page |
201 | 201 | $langs->loadLangs(array('payment', 'stripe')); |
202 | 202 | |
203 | - $servicename = ''; // Link is a generic link for all payments services (paypal, stripe, ...) |
|
203 | + $servicename = ''; // Link is a generic link for all payments services (paypal, stripe, ...) |
|
204 | 204 | |
205 | 205 | $out = img_picto('', 'globe') . ' <span class="opacitymedium">' . $langs->trans("ToOfferALinkForOnlinePayment", $servicename) . '</span><br>'; |
206 | 206 | $url = getOnlinePaymentUrl(0, $type, $ref, $amount); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | $urlwithroot = $urlwithouturlroot . DOL_URL_ROOT; // This is to use external domain name found into config file |
251 | 251 | //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current |
252 | 252 | |
253 | - $urltouse = DOL_MAIN_URL_ROOT; // Should be "https://www.mydomain.com/mydolibarr" for example |
|
253 | + $urltouse = DOL_MAIN_URL_ROOT; // Should be "https://www.mydomain.com/mydolibarr" for example |
|
254 | 254 | //dol_syslog("getOnlinePaymentUrl DOL_MAIN_URL_ROOT=".DOL_MAIN_URL_ROOT); |
255 | 255 | |
256 | 256 | if ($localorexternal) { |
@@ -76,10 +76,10 @@ |
||
76 | 76 | //global $dolibarr_main_url_root; |
77 | 77 | //$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); |
78 | 78 | //$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file |
79 | - $urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than current |
|
79 | + $urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than current |
|
80 | 80 | |
81 | 81 | //$shortscope = 'userinfo_email,userinfo_profile'; |
82 | - $shortscope = 'openid,email,profile'; // For openid connect |
|
82 | + $shortscope = 'openid,email,profile'; // For openid connect |
|
83 | 83 | |
84 | 84 | $oauthstateanticsrf = bin2hex(random_bytes(128 / 8)); |
85 | 85 | $_SESSION['oauthstateanticsrf'] = $shortscope . '-' . $oauthstateanticsrf; |
@@ -62,7 +62,7 @@ |
||
62 | 62 | */ |
63 | 63 | function decodeHttpBasicAuth($value) |
64 | 64 | { |
65 | - $encoded_basic_auth = substr($value, 6); // Remove the "Basic " string |
|
65 | + $encoded_basic_auth = substr($value, 6); // Remove the "Basic " string |
|
66 | 66 | $decoded_basic_auth = base64_decode($encoded_basic_auth); |
67 | 67 | $credentials_basic_auth = explode(':', $decoded_basic_auth); |
68 | 68 |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | } |
165 | 165 | } else { |
166 | 166 | dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO user not found for '" . $usertotest . "'", LOG_NOTICE); |
167 | - sleep(1); // Anti brut force protection. Must be same delay when password is not valid |
|
167 | + sleep(1); // Anti brut force protection. Must be same delay when password is not valid |
|
168 | 168 | |
169 | 169 | // Load translation files required by the page |
170 | 170 | $langs->loadLangs(array('main', 'errors')); |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | } |
179 | 179 | } else { |
180 | 180 | dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO Too many attempts", LOG_NOTICE); |
181 | - sleep(1); // Anti brut force protection. Must be same delay when password is not valid |
|
181 | + sleep(1); // Anti brut force protection. Must be same delay when password is not valid |
|
182 | 182 | // Load translation files required by the page |
183 | 183 | $langs->loadLangs(array('main', 'errors')); |
184 | 184 | $_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorTooManyAttempts"); |