Skip to content

Commit

Permalink
Fix: Bad url for cron
Browse files Browse the repository at this point in the history
Fix: must use html syntax, not xml
  • Loading branch information
eldy committed Jul 28, 2014
1 parent c20256f commit bcd441c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions htdocs/core/lib/cron.lib.php
Expand Up @@ -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>';

Expand Down
8 changes: 4 additions & 4 deletions htdocs/cron/list.php
Expand Up @@ -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
Expand Down Expand Up @@ -218,13 +218,13 @@
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>';
Expand Down
8 changes: 4 additions & 4 deletions htdocs/public/cron/cron_run_jobs.php
Expand Up @@ -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';
Expand Down Expand Up @@ -175,7 +175,7 @@
}
else
{
echo "No active jobs found";
echo "Result: No active jobs found.";
}

$db->close();

0 comments on commit bcd441c

Please sign in to comment.