mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Fix: Bad url for cron
Fix: must use html syntax, not xml
This commit is contained in:
@@ -93,10 +93,10 @@ function dol_print_cron_urls()
|
||||
|
||||
// Cron launch
|
||||
print '<u>'.$langs->trans("URLToLaunchCronJobs").':</u><br>';
|
||||
$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').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
||||
print ' '.$langs->trans("OrToLaunchASpecificJob").'<br>';
|
||||
$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').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
||||
print '<br>';
|
||||
|
||||
|
||||
@@ -123,13 +123,13 @@ print $langs->trans('CronInfo');
|
||||
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 @@ if (count($object->lines) > 0)
|
||||
print $langs->trans('CronObject').':'. $line->objectname.'<BR>';
|
||||
print $langs->trans('CronMethod').':'. $line->methodename;
|
||||
if(!empty($line->params)) {
|
||||
print '<BR/>'.$langs->trans('CronArgs').':'. $line->params;
|
||||
print '<br>'.$langs->trans('CronArgs').':'. $line->params;
|
||||
}
|
||||
|
||||
}elseif ($line->jobtype=='command') {
|
||||
print $langs->trans('CronCommand').':'. dol_trunc($line->command);
|
||||
if(!empty($line->params)) {
|
||||
print '<BR/>'.$langs->trans('CronArgs').':'. $line->params;
|
||||
print '<br>'.$langs->trans('CronArgs').':'. $line->params;
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
@@ -59,19 +59,19 @@ $langs->load("cron");
|
||||
$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 @@ if (is_array($object->lines) && (count($object->lines)>0))
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "No active jobs found";
|
||||
echo "Result: No active jobs found.";
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
Reference in New Issue
Block a user