From bcd441cc1e8d61abc77d45124aeed8a194fda7e7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jul 2014 20:30:31 +0200 Subject: [PATCH] Fix: Bad url for cron Fix: must use html syntax, not xml --- htdocs/core/lib/cron.lib.php | 4 ++-- htdocs/cron/list.php | 8 ++++---- htdocs/public/cron/cron_run_jobs.php | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/core/lib/cron.lib.php b/htdocs/core/lib/cron.lib.php index 34a21c83dab11..79e23e9008943 100644 --- a/htdocs/core/lib/cron.lib.php +++ b/htdocs/core/lib/cron.lib.php @@ -93,10 +93,10 @@ function dol_print_cron_urls() // Cron launch print ''.$langs->trans("URLToLaunchCronJobs").':
'; - $url=$urlwithroot.'/public/cron/cron_run_jobs.php'.(empty($conf->global->CRON_KEY)?'':'?securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login; + $url=$urlwithroot.'/public/cron/cron_run_jobs.php?'.(empty($conf->global->CRON_KEY)?'':'securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login; print img_picto('','object_globe.png').' '.$url."
\n"; print ' '.$langs->trans("OrToLaunchASpecificJob").'
'; - $url=$urlwithroot.'/public/cron/cron_run_jobs.php'.(empty($conf->global->CRON_KEY)?'':'?securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login.'&id=cronjobid'; + $url=$urlwithroot.'/public/cron/cron_run_jobs.php?'.(empty($conf->global->CRON_KEY)?'':'securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login.'&id=cronjobid'; print img_picto('','object_globe.png').' '.$url."
\n"; print '
'; diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 453de0d851504..dd9eb8b628971 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -123,13 +123,13 @@ if ($action == 'delete') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronDelete"),$langs->trans("CronConfirmDelete"),"confirm_delete",'','',1); - + } if ($action == 'execute') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1); - + } // liste des jobs creer @@ -218,13 +218,13 @@ print $langs->trans('CronObject').':'. $line->objectname.'
'; print $langs->trans('CronMethod').':'. $line->methodename; if(!empty($line->params)) { - print '
'.$langs->trans('CronArgs').':'. $line->params; + print '
'.$langs->trans('CronArgs').':'. $line->params; } }elseif ($line->jobtype=='command') { print $langs->trans('CronCommand').':'. dol_trunc($line->command); if(!empty($line->params)) { - print '
'.$langs->trans('CronArgs').':'. $line->params; + print '
'.$langs->trans('CronArgs').':'. $line->params; } } print ''; diff --git a/htdocs/public/cron/cron_run_jobs.php b/htdocs/public/cron/cron_run_jobs.php index cb4ae42ff136a..e6333526c7f25 100644 --- a/htdocs/public/cron/cron_run_jobs.php +++ b/htdocs/public/cron/cron_run_jobs.php @@ -59,19 +59,19 @@ $key = GETPOST('securitykey','alpha'); if (empty($key)) { - echo 'securitykey is require'; + echo 'Securitykey is required. Check setup of cron jobs module.'; exit; } if($key != $conf->global->CRON_KEY) { - echo 'securitykey is wrong'; + echo 'Securitykey is wrong.'; exit; } // Check the key, avoid that a stranger starts cron $userlogin = GETPOST('userlogin','alpha'); if (empty($userlogin)) { - echo 'userlogin is require'; + echo 'Userlogin is required.'; exit; } require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; @@ -175,7 +175,7 @@ } else { - echo "No active jobs found"; + echo "Result: No active jobs found."; } $db->close();