@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | } |
161 | 161 | } else { |
162 | 162 | dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO user not found for '".$usertotest."'", LOG_NOTICE); |
163 | - sleep(1); // Anti brut force protection. Must be same delay when password is not valid |
|
163 | + sleep(1); // Anti brut force protection. Must be same delay when password is not valid |
|
164 | 164 | |
165 | 165 | // Load translation files required by the page |
166 | 166 | $langs->loadLangs(array('main', 'errors')); |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | } |
175 | 175 | } else { |
176 | 176 | dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO Too many attempts", LOG_NOTICE); |
177 | - sleep(1); // Anti brut force protection. Must be same delay when password is not valid |
|
177 | + sleep(1); // Anti brut force protection. Must be same delay when password is not valid |
|
178 | 178 | // Load translation files required by the page |
179 | 179 | $langs->loadLangs(array('main', 'errors')); |
180 | 180 | $_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorTooManyAttempts"); |
@@ -75,12 +75,12 @@ |
||
75 | 75 | //global $dolibarr_main_url_root; |
76 | 76 | //$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); |
77 | 77 | //$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file |
78 | - $urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current |
|
78 | + $urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than current |
|
79 | 79 | |
80 | 80 | //$shortscope = 'userinfo_email,userinfo_profile'; |
81 | - $shortscope = 'openid,email,profile'; // For openid connect |
|
81 | + $shortscope = 'openid,email,profile'; // For openid connect |
|
82 | 82 | |
83 | - $oauthstateanticsrf = bin2hex(random_bytes(128/8)); |
|
83 | + $oauthstateanticsrf = bin2hex(random_bytes(128 / 8)); |
|
84 | 84 | $_SESSION['oauthstateanticsrf'] = $shortscope.'-'.$oauthstateanticsrf; |
85 | 85 | |
86 | 86 | $url = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?shortscope='.urlencode($shortscope).'&state='.urlencode('forlogin-'.$shortscope.'-'.$oauthstateanticsrf).'&username='.urlencode($usertotest); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | // Object card |
119 | 119 | // ------------------------------------------------------------ |
120 | - $linkback = '<a href="' . dol_buildpath('/asset/asset_list.php', 1) . '?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
120 | + $linkback = '<a href="'.dol_buildpath('/asset/asset_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
121 | 121 | |
122 | 122 | $morehtmlref = '<div class="refidno">'; |
123 | 123 | $morehtmlref .= '</div>'; |
@@ -130,10 +130,10 @@ discard block |
||
130 | 130 | print '<table class="border centpercent tableforfield">'; |
131 | 131 | |
132 | 132 | // Number of files |
133 | - print '<tr><td class="titlefield">' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>'; |
|
133 | + print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>'; |
|
134 | 134 | |
135 | 135 | // Total size |
136 | - print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans("bytes") . '</td></tr>'; |
|
136 | + print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>'; |
|
137 | 137 | |
138 | 138 | print '</table>'; |
139 | 139 | |
@@ -146,12 +146,12 @@ discard block |
||
146 | 146 | // $permissiontoadd = 1; |
147 | 147 | $permtoedit = $user->hasRight('asset', 'write'); |
148 | 148 | // $permtoedit = 1; |
149 | - $param = '&id=' . $object->id; |
|
149 | + $param = '&id='.$object->id; |
|
150 | 150 | |
151 | 151 | //$relativepathwithnofile='asset/' . dol_sanitizeFileName($object->id).'/'; |
152 | - $relativepathwithnofile = dol_sanitizeFileName($object->ref) . '/'; |
|
152 | + $relativepathwithnofile = dol_sanitizeFileName($object->ref).'/'; |
|
153 | 153 | |
154 | - include DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; |
|
154 | + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; |
|
155 | 155 | } else { |
156 | 156 | accessforbidden('', 0, 1); |
157 | 157 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $object = new Dolresource($db); |
45 | 45 | |
46 | 46 | // Load object |
47 | -include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once |
|
47 | +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once |
|
48 | 48 | |
49 | 49 | // Security check |
50 | 50 | if ($user->socid) { |
@@ -537,8 +537,8 @@ |
||
537 | 537 | // Ref customer |
538 | 538 | //$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $fichinter->ref_client, $fichinter, $user->rights->ficheinter->creer, 'string', '', 0, 1); |
539 | 539 | //$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $fichinter->ref_client, $fichinter, $user->rights->ficheinter->creer, 'string', '', null, null, '', 1); |
540 | - $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $fichinter->ref_client, $fichinter, 0, 'string', '', 0, 1); |
|
541 | - $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $fichinter->ref_client, $fichinter, 0, 'string', '', null, null, '', 1); |
|
540 | + $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $fichinter->ref_client, $fichinter, 0, 'string', '', 0, 1); |
|
541 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $fichinter->ref_client, $fichinter, 0, 'string', '', null, null, '', 1); |
|
542 | 542 | // Thirdparty |
543 | 543 | $morehtmlref .= '<br>'.$fichinter->thirdparty->getNomUrl(1, 'customer'); |
544 | 544 | // Project |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | $websitekey = ''; |
102 | 102 | |
103 | -$permissiontoadd = $permissiontouploadfile; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles |
|
103 | +$permissiontoadd = $permissiontouploadfile; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles |
|
104 | 104 | |
105 | 105 | // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context |
106 | 106 | $hookmanager->initHooks(array('ecmmediascard', 'globalcard')); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | if ($sortorder) { |
118 | 118 | $backtopage .= '&sortorder='.urlencode($sortorder); |
119 | 119 | } |
120 | -include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
120 | +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
121 | 121 | |
122 | 122 | $backtopage = $savbacktopage; |
123 | 123 |
@@ -179,9 +179,9 @@ |
||
179 | 179 | public $max_total_amount_of_all_payments; |
180 | 180 | public $preapproval_key; |
181 | 181 | public $total_amount_of_all_payments; |
182 | - public $stripe_card_ref; // External system payment mode ID |
|
183 | - public $stripe_account; // External system customer ID |
|
184 | - public $ext_payment_site; // External system 'StripeLive', 'StripeTest', 'StancerLive', 'StancerTest', ... |
|
182 | + public $stripe_card_ref; // External system payment mode ID |
|
183 | + public $stripe_account; // External system customer ID |
|
184 | + public $ext_payment_site; // External system 'StripeLive', 'StripeTest', 'StancerLive', 'StancerTest', ... |
|
185 | 185 | |
186 | 186 | /** |
187 | 187 | * @var int Status |
@@ -280,7 +280,7 @@ |
||
280 | 280 | |
281 | 281 | // Type |
282 | 282 | $membertypestatic->id = $objp->type_id; |
283 | - $membertypestatic->libelle = $objp->type_label; // deprecated |
|
283 | + $membertypestatic->libelle = $objp->type_label; // deprecated |
|
284 | 284 | $membertypestatic->label = $objp->type_label; |
285 | 285 | |
286 | 286 | print '<td class="nowrap">'; |
@@ -216,7 +216,7 @@ |
||
216 | 216 | if (!$disable_delete) { |
217 | 217 | print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), '', 1); |
218 | 218 | } else { |
219 | - print dolGetButtonAction($langs->trans("CantRemovePaymentWithOneInvoicePaid"), $langs->trans('Delete'), '', $_SERVER["PHP_SELF"].'?id='.$object->id.'#', '', 1, [ 'attr' => ['classOverride' => 'butActionRefused']]); |
|
219 | + print dolGetButtonAction($langs->trans("CantRemovePaymentWithOneInvoicePaid"), $langs->trans('Delete'), '', $_SERVER["PHP_SELF"].'?id='.$object->id.'#', '', 1, ['attr' => ['classOverride' => 'butActionRefused']]); |
|
220 | 220 | } |
221 | 221 | } |
222 | 222 | } |