@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | } else { |
90 | 90 | $db->commit(); |
91 | 91 | setEventMessage($langs->trans('SetupSaved')); |
92 | - header('Location: ' . $_SERVER["PHP_SELF"]); |
|
92 | + header('Location: '.$_SERVER["PHP_SELF"]); |
|
93 | 93 | exit(); |
94 | 94 | } |
95 | 95 | } elseif (preg_match('/del_(.*)/', $action, $reg)) { |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | } else { |
110 | 110 | $db->commit(); |
111 | 111 | setEventMessage($langs->trans('SetupSaved')); |
112 | - header('Location: ' . $_SERVER["PHP_SELF"]); |
|
112 | + header('Location: '.$_SERVER["PHP_SELF"]); |
|
113 | 113 | exit(); |
114 | 114 | } |
115 | 115 | } elseif ($action == 'save') { |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | print '<tr class="oddeven">'; |
253 | 253 | print "<td>".$langs->trans("ExtSitesNbOfAgenda")."</td>"; |
254 | 254 | print '<td class="center">'; |
255 | -print '<input class="flat hideifnotset width50 center" type="text" id="AGENDA_EXT_NB" name="AGENDA_EXT_NB" value="' . getDolGlobalString('AGENDA_EXT_NB').'">'; |
|
255 | +print '<input class="flat hideifnotset width50 center" type="text" id="AGENDA_EXT_NB" name="AGENDA_EXT_NB" value="'.getDolGlobalString('AGENDA_EXT_NB').'">'; |
|
256 | 256 | print "</td>"; |
257 | 257 | print "</tr>"; |
258 | 258 | |
@@ -274,36 +274,36 @@ discard block |
||
274 | 274 | $i = 1; |
275 | 275 | while ($i <= $MAXAGENDA) { |
276 | 276 | $key = $i; |
277 | - $name = 'AGENDA_EXT_NAME' . $key; |
|
278 | - $src = 'AGENDA_EXT_SRC' . $key; |
|
279 | - $offsettz = 'AGENDA_EXT_OFFSETTZ' . $key; |
|
280 | - $color = 'AGENDA_EXT_COLOR' . $key; |
|
281 | - $enabled = 'AGENDA_EXT_ENABLED' . $key; |
|
282 | - $default = 'AGENDA_EXT_ACTIVEBYDEFAULT' . $key; |
|
277 | + $name = 'AGENDA_EXT_NAME'.$key; |
|
278 | + $src = 'AGENDA_EXT_SRC'.$key; |
|
279 | + $offsettz = 'AGENDA_EXT_OFFSETTZ'.$key; |
|
280 | + $color = 'AGENDA_EXT_COLOR'.$key; |
|
281 | + $enabled = 'AGENDA_EXT_ENABLED'.$key; |
|
282 | + $default = 'AGENDA_EXT_ACTIVEBYDEFAULT'.$key; |
|
283 | 283 | |
284 | 284 | print '<tr class="oddeven">'; |
285 | 285 | // Nb @phan-suppress-next-line PhanPluginSuspiciousParamPosition |
286 | - print '<td width="180" class="nowrap">' . $langs->trans("AgendaExtNb", $key) . "</td>"; |
|
286 | + print '<td width="180" class="nowrap">'.$langs->trans("AgendaExtNb", $key)."</td>"; |
|
287 | 287 | // Name |
288 | - print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_NAME' . $key . '" value="' . (GETPOST('AGENDA_EXT_NAME' . $key) ? GETPOST('AGENDA_EXT_NAME' . $key, 'alpha') : getDolGlobalString($name)) . '" size="28"></td>'; |
|
288 | + print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_NAME'.$key.'" value="'.(GETPOST('AGENDA_EXT_NAME'.$key) ? GETPOST('AGENDA_EXT_NAME'.$key, 'alpha') : getDolGlobalString($name)).'" size="28"></td>'; |
|
289 | 289 | // URL |
290 | - print '<td><input type="url" class="flat hideifnotset" name="AGENDA_EXT_SRC' . $key . '" value="' . (GETPOST('AGENDA_EXT_SRC' . $key) ? GETPOST('AGENDA_EXT_SRC' . $key, 'alpha') : getDolGlobalString($src)) . '" size="60"></td>'; |
|
290 | + print '<td><input type="url" class="flat hideifnotset" name="AGENDA_EXT_SRC'.$key.'" value="'.(GETPOST('AGENDA_EXT_SRC'.$key) ? GETPOST('AGENDA_EXT_SRC'.$key, 'alpha') : getDolGlobalString($src)).'" size="60"></td>'; |
|
291 | 291 | // Offset TZ |
292 | - print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_OFFSETTZ' . $key . '" value="' . (GETPOST('AGENDA_EXT_OFFSETTZ' . $key) ? GETPOST('AGENDA_EXT_OFFSETTZ' . $key) : getDolGlobalString($offsettz)) . '" size="2"></td>'; |
|
292 | + print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_OFFSETTZ'.$key.'" value="'.(GETPOST('AGENDA_EXT_OFFSETTZ'.$key) ? GETPOST('AGENDA_EXT_OFFSETTZ'.$key) : getDolGlobalString($offsettz)).'" size="2"></td>'; |
|
293 | 293 | // Color (Possible colors are limited by Google) |
294 | 294 | print '<td class="nowraponall right">'; |
295 | - print $formother->selectColor((GETPOST("AGENDA_EXT_COLOR" . $key) ? GETPOST("AGENDA_EXT_COLOR" . $key) : getDolGlobalString($color)), "AGENDA_EXT_COLOR" . $key, '', 1, array(), 'hideifnotset'); |
|
295 | + print $formother->selectColor((GETPOST("AGENDA_EXT_COLOR".$key) ? GETPOST("AGENDA_EXT_COLOR".$key) : getDolGlobalString($color)), "AGENDA_EXT_COLOR".$key, '', 1, array(), 'hideifnotset'); |
|
296 | 296 | print '</td>'; |
297 | 297 | // Calendar active by default |
298 | 298 | print '<td class="nowrap right">'; |
299 | 299 | if (!empty($conf->use_javascript_ajax)) { |
300 | - print ajax_constantonoff('AGENDA_EXT_ACTIVEBYDEFAULT' . $key); |
|
300 | + print ajax_constantonoff('AGENDA_EXT_ACTIVEBYDEFAULT'.$key); |
|
301 | 301 | } else { |
302 | 302 | // @phan-suppress-next-line PhanPluginSuspiciousParamPosition |
303 | 303 | if (getDolGlobalString($default)) { |
304 | - print '<a href="' . $_SERVER['PHP_SELF'] . '?action=del_AGENDA_EXT_ACTIVEBYDEFAULT' . $key . '&token='.newToken().'">' . img_picto($langs->trans("Disabled"), 'off') . '</a>'; |
|
304 | + print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_EXT_ACTIVEBYDEFAULT'.$key.'&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'off').'</a>'; |
|
305 | 305 | } else { |
306 | - print '<a href="' . $_SERVER['PHP_SELF'] . '?action=set_AGENDA_EXT_ACTIVEBYDEFAULT' . $key . '&token='.newToken().'">' . img_picto($langs->trans("Enabled"), 'on') . '</a>'; |
|
306 | + print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_EXT_ACTIVEBYDEFAULT'.$key.'&token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'on').'</a>'; |
|
307 | 307 | } |
308 | 308 | } |
309 | 309 | print '</td>'; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | /** |
50 | 50 | * @var string Stripe ID (Note: Conflict with CommonObject) |
51 | 51 | */ |
52 | - public $id; // @phpstan-ignore-line |
|
52 | + public $id; // @phpstan-ignore-line |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * @var string |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | "confirmation_method" => $stripemode, |
495 | 495 | "amount" => $stripeamount, |
496 | 496 | "currency" => $currency_code, |
497 | - "payment_method_types" => $paymentmethodtypes, // When payment_method_types is set, return_url is not required but payment mode can't be managed from dashboard |
|
497 | + "payment_method_types" => $paymentmethodtypes, // When payment_method_types is set, return_url is not required but payment mode can't be managed from dashboard |
|
498 | 498 | /* |
499 | 499 | 'return_url' => $dolibarr_main_url_root.'/public/payment/paymentok.php', |
500 | 500 | 'automatic_payment_methods' => array( |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | ); |
510 | 510 | if ($descriptor) { |
511 | 511 | $dataforintent["statement_descriptor_suffix"] = $descriptor; // For card payment, 22 chars that appears on bank receipt (prefix into stripe setup + this suffix) |
512 | - $dataforintent["statement_descriptor"] = $descriptor; // For SEPA, it will take only statement_descriptor, not statement_descriptor_suffix |
|
512 | + $dataforintent["statement_descriptor"] = $descriptor; // For SEPA, it will take only statement_descriptor, not statement_descriptor_suffix |
|
513 | 513 | } |
514 | 514 | if (!is_null($customer)) { |
515 | 515 | $dataforintent["customer"] = $customer; |
@@ -723,7 +723,7 @@ discard block |
||
723 | 723 | |
724 | 724 | $dataforintent = array( |
725 | 725 | "confirm" => $confirmnow, // Do not confirm immediately during creation of intent |
726 | - "payment_method_types" => $paymentmethodtypes, // When payment_method_types is set, return_url is not required but payment mode can't be managed from dashboard |
|
726 | + "payment_method_types" => $paymentmethodtypes, // When payment_method_types is set, return_url is not required but payment mode can't be managed from dashboard |
|
727 | 727 | /* |
728 | 728 | 'return_url' => $dolibarr_main_url_root.'/public/payment/paymentok.php', |
729 | 729 | 'automatic_payment_methods' => array( |
@@ -1120,7 +1120,7 @@ discard block |
||
1120 | 1120 | $sql = "UPDATE ".MAIN_DB_PREFIX."societe_rib"; |
1121 | 1121 | $sql .= " SET stripe_card_ref = '".$this->db->escape($sepa->id)."',"; |
1122 | 1122 | $sql .= " card_type = 'sepa_debit',"; |
1123 | - $sql .= " stripe_account= '" . $this->db->escape($cu->id . "@" . $stripeacc) . "',"; |
|
1123 | + $sql .= " stripe_account= '".$this->db->escape($cu->id."@".$stripeacc)."',"; |
|
1124 | 1124 | $sql .= " ext_payment_site = '".$this->db->escape($service)."'"; |
1125 | 1125 | if (!empty($cs->mandate)) { |
1126 | 1126 | $mandateservice = new \Stripe\Mandate($stripeacc); |
@@ -1144,7 +1144,7 @@ discard block |
||
1144 | 1144 | } catch (Exception $e) { |
1145 | 1145 | $sepa = null; |
1146 | 1146 | $this->error = 'Stripe error: '.$e->getMessage().'. Check the BAN information.'; |
1147 | - dol_syslog($this->error, LOG_WARNING); // Error from Stripe, so a warning on Dolibarr |
|
1147 | + dol_syslog($this->error, LOG_WARNING); // Error from Stripe, so a warning on Dolibarr |
|
1148 | 1148 | } |
1149 | 1149 | } |
1150 | 1150 | } |
@@ -105,6 +105,6 @@ |
||
105 | 105 | foreach ($cate_arbo as $categ) { |
106 | 106 | $response[] = array('id' => $categ['id'], 'label' => $categ['label'], 'fulllabel' => $categ['fulllabel'], 'htmlforoption' => dolPrintHTML((string) $categ['fulllabel']), 'htmlforattribute' => dolPrintHTMLForAttribute((string) $categ['data-html']), 'color' => $categ['color']); |
107 | 107 | } |
108 | - $response =json_encode($response); |
|
108 | + $response = json_encode($response); |
|
109 | 109 | echo $response; |
110 | 110 | } |