* 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
This commit is contained in:
parent
0aea1709f7
commit
a6f2001f43
1 changed files with 4 additions and 4 deletions
|
|
@ -104,13 +104,13 @@ if (getDolGlobalInt('CRON_DISABLE_KEY_CHANGE') > 0) {
|
|||
$disabled = ' disabled="disabled"';
|
||||
}
|
||||
print '<td>';
|
||||
if (getDolGlobalString('CRON_DISABLE_KEY_CHANGE') != 1) {
|
||||
if (getDolGlobalInt('CRON_DISABLE_KEY_CHANGE') != 1) {
|
||||
print '<input type="text" class="flat minwidth300 widthcentpercentminusx"'.$disabled.' id="CRON_KEY" name="CRON_KEY" value="'.(GETPOST('CRON_KEY') ? GETPOST('CRON_KEY') : getDolGlobalString('CRON_KEY')).'">';
|
||||
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 '</table>';
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
if (!getDolGlobalString('CRON_DISABLE_KEY_CHANGE')) {
|
||||
if (!getDolGlobalInt('CRON_DISABLE_KEY_CHANGE')) {
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue