From a6f2001f4349d1cf637cc75cf7bc7ffabb3692f5 Mon Sep 17 00:00:00 2001 From: PsyCrow <93346975+PsyCrow-code@users.noreply.github.com> Date: Tue, 1 Apr 2025 02:57:46 -0600 Subject: [PATCH] FIX #33424 Create cronjob security key not posible (#33677) * FIX #33424 Create cronjob security key not posible FIX Create cronjob security key not posible because constant CRON_DISABLE_KEY_CHANGE does not exist * Update cron.php using getDolGlobalInt() is better than using getDolGlobalString because the default value is 0; then the refresh button works fine --- htdocs/cron/admin/cron.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/cron/admin/cron.php b/htdocs/cron/admin/cron.php index d2b0e2e3668..ff867c5a6dd 100644 --- a/htdocs/cron/admin/cron.php +++ b/htdocs/cron/admin/cron.php @@ -104,13 +104,13 @@ if (getDolGlobalInt('CRON_DISABLE_KEY_CHANGE') > 0) { $disabled = ' disabled="disabled"'; } print ''; -if (getDolGlobalString('CRON_DISABLE_KEY_CHANGE') != 1) { +if (getDolGlobalInt('CRON_DISABLE_KEY_CHANGE') != 1) { print ''; - if (getDolGlobalString('CRON_DISABLE_KEY_CHANGE') == 0) { + if (getDolGlobalInt('CRON_DISABLE_KEY_CHANGE') == 0) { if (!empty($conf->use_javascript_ajax)) { print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"'); } - } elseif (getDolGlobalString('CRON_DISABLE_KEY_CHANGE') == -1) { + } elseif (getDolGlobalInt('CRON_DISABLE_KEY_CHANGE') == -1) { $langs->load("errors"); print ' '.img_picto($langs->trans("WarningChangingThisMayBreakStopTaskScheduler"), 'info'); } @@ -126,7 +126,7 @@ print ''; print dol_get_fiche_end(); -if (!getDolGlobalString('CRON_DISABLE_KEY_CHANGE')) { +if (!getDolGlobalInt('CRON_DISABLE_KEY_CHANGE')) { print $form->buttonsSaveCancel("Save", ''); }