FIX stickler-ci

This commit is contained in:
lvessiller 2021-08-31 18:34:26 +02:00
parent 4781dca2c2
commit c367c1009b

View File

@ -59,7 +59,7 @@ $colorlist = array('BECEDD', 'DDBECE', 'BFDDBE', 'F598B4', 'F68654', 'CBF654', '
$error = 0; $error = 0;
$errors = array(); $errors = array();
if (preg_match('/set_(.*)/', $action,$reg)) { if (preg_match('/set_(.*)/', $action, $reg)) {
$db->begin(); $db->begin();
$code = $reg[1]; $code = $reg[1];
@ -80,7 +80,7 @@ if (preg_match('/set_(.*)/', $action,$reg)) {
header('Location: ' . $_SERVER["PHP_SELF"]); header('Location: ' . $_SERVER["PHP_SELF"]);
exit(); exit();
} }
} elseif (preg_match('/del_(.*)/', $action,$reg)) { } elseif (preg_match('/del_(.*)/', $action, $reg)) {
$db->begin(); $db->begin();
$code = $reg[1]; $code = $reg[1];
@ -260,7 +260,7 @@ while ($i <= $MAXAGENDA) {
$offsettz = 'AGENDA_EXT_OFFSETTZ'.$key; $offsettz = 'AGENDA_EXT_OFFSETTZ'.$key;
$color = 'AGENDA_EXT_COLOR'.$key; $color = 'AGENDA_EXT_COLOR'.$key;
$enabled = 'AGENDA_EXT_ENABLED'.$key; $enabled = 'AGENDA_EXT_ENABLED'.$key;
$default = 'AGENDA_EXT_ACTIVEBYDEFAULT'.$key; $default = 'AGENDA_EXT_ACTIVEBYDEFAULT'.$key;
print '<tr class="oddeven">'; print '<tr class="oddeven">';
// Nb // Nb
@ -279,12 +279,12 @@ while ($i <= $MAXAGENDA) {
// Calendar active by default // Calendar active by default
print '<td class="nowrap right">'; print '<td class="nowrap right">';
if ($conf->use_javascript_ajax) { if ($conf->use_javascript_ajax) {
print ajax_constantonoff('AGENDA_EXT_ACTIVEBYDEFAULT'.$key); print ajax_constantonoff('AGENDA_EXT_ACTIVEBYDEFAULT' . $key);
} else { } else {
if (empty($conf->global->{$default})) { if (empty($conf->global->{$default})) {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_EXT_ACTIVEBYDEFAULT'.$key.'">'.img_picto($langs->trans("Enabled"), 'on').'</a>'; print '<a href="' . $_SERVER['PHP_SELF'] . '?action=set_AGENDA_EXT_ACTIVEBYDEFAULT' . $key . '">' . img_picto($langs->trans("Enabled"), 'on') . '</a>';
} else { } else {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_EXT_ACTIVEBYDEFAULT'.$key.'">'.img_picto($langs->trans("Disabled"), 'off').'</a>'; print '<a href="' . $_SERVER['PHP_SELF'] . '?action=del_AGENDA_EXT_ACTIVEBYDEFAULT' . $key . '">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
} }
} }
print '</td>'; print '</td>';