diff --git a/htdocs/cron/admin/cron.php b/htdocs/cron/admin/cron.php
index ea4209ae91d..5afbf30d292 100644
--- a/htdocs/cron/admin/cron.php
+++ b/htdocs/cron/admin/cron.php
@@ -32,22 +32,21 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/cron.lib.php';
// Load translation files required by the page
$langs->loadLangs(array('admin', 'cron'));
-if (!$user->admin)
+if (!$user->admin) {
accessforbidden();
+}
$actionsave = GETPOST("save", 'alphanohtml');
// Save parameters
-if (!empty($actionsave))
-{
+if (!empty($actionsave)) {
$i = 0;
$db->begin();
$i += dolibarr_set_const($db, 'CRON_KEY', GETPOST("CRON_KEY"), 'chaine', 0, '', 0);
- if ($i >= 1)
- {
+ if ($i >= 1) {
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
@@ -90,13 +89,15 @@ print "";
print '
';
print '| '.$langs->trans("KeyForCronAccess").' | ';
$disabled = '';
-if (!empty($conf->global->CRON_DISABLE_KEY_CHANGE)) $disabled = ' disabled="disabled"';
+if (!empty($conf->global->CRON_DISABLE_KEY_CHANGE)) {
+ $disabled = ' disabled="disabled"';
+}
print '';
-if (empty($conf->global->CRON_DISABLE_KEY_CHANGE))
-{
+if (empty($conf->global->CRON_DISABLE_KEY_CHANGE)) {
print '';
- if (!empty($conf->use_javascript_ajax))
+ if (!empty($conf->use_javascript_ajax)) {
print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"');
+ }
} else {
print (!empty($conf->global->CRON_KEY) ? $conf->global->CRON_KEY : '');
print '';
@@ -119,7 +120,9 @@ print '';
print '
';
//print $langs->trans("UseMenuModuleToolsToAddCronJobs", dol_buildpath('/cron/list.php?leftmenu=admintools', 1)).' ';
-if (!empty($conf->global->CRON_WARNING_DELAY_HOURS)) print info_admin($langs->trans("WarningCronDelayed", $conf->global->CRON_WARNING_DELAY_HOURS)).' ';
+if (!empty($conf->global->CRON_WARNING_DELAY_HOURS)) {
+ print info_admin($langs->trans("WarningCronDelayed", $conf->global->CRON_WARNING_DELAY_HOURS)).' ';
+}
print ' ';
@@ -128,8 +131,7 @@ dol_print_cron_urls();
print ' ';
-if (!empty($conf->use_javascript_ajax))
-{
+if (!empty($conf->use_javascript_ajax)) {
print "\n".''."\n";
}
-if ($action == 'delete')
-{
+if ($action == 'delete') {
print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id, $langs->trans("CronDelete"), $langs->trans("CronConfirmDelete"), "confirm_delete", '', '', 1);
$action = '';
@@ -290,13 +276,11 @@ if ($action == 'execute') {
* Create Template
*/
-if (empty($object->status) && $action != 'create')
-{
+if (empty($object->status) && $action != 'create') {
setEventMessages($langs->trans("CronTaskInactive"), null, 'warnings');
}
-if (($action == "create") || ($action == "edit"))
-{
+if (($action == "create") || ($action == "edit")) {
print ' |