mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix test param $id
This commit is contained in:
parent
6952f346ad
commit
1249e597d4
|
|
@ -111,15 +111,14 @@ if (! empty($id))
|
|||
dol_syslog("cron_run_jobs.php Bad value for parameter job id", LOG_WARNING);
|
||||
exit;
|
||||
}
|
||||
$filter=array();
|
||||
$filter['t.rowid']=$id;
|
||||
}
|
||||
|
||||
$result = $object->fetch_all('DESC','t.rowid', 0, 0, 1, $filter, 0);
|
||||
$result = $object->fetch_all('ASC,ASC,ASC','t.priority,t.entity,t.rowid', 0, 0, 1, $filter, 0);
|
||||
if ($result<0)
|
||||
{
|
||||
echo "Error: ".$cronjob->error;
|
||||
dol_syslog("cron_run_jobs.php fetch Error".$cronjob->error, LOG_WARNING);
|
||||
echo "Error: ".$object->error;
|
||||
dol_syslog("cron_run_jobs.php fetch Error".$object->error, LOG_WARNING);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -143,6 +143,12 @@ $object = new Cronjob($db);
|
|||
|
||||
$filter=array();
|
||||
if (! empty($id)) {
|
||||
if (! is_numeric($id))
|
||||
{
|
||||
echo "Error: Bad value for parameter job id";
|
||||
dol_syslog("cron_run_jobs.php Bad value for parameter job id", LOG_WARNING);
|
||||
exit;
|
||||
}
|
||||
$filter['t.rowid']=$id;
|
||||
}
|
||||
|
||||
|
|
@ -162,7 +168,7 @@ foreach($object->lines as $val)
|
|||
$qualifiedjobs[] = $val;
|
||||
}
|
||||
|
||||
// TODO This sequence of code must be shared with code into public/cron/cron_run_jobs.php php page.
|
||||
// TODO Duplicate. This sequence of code must be shared with code into public/cron/cron_run_jobs.php php page.
|
||||
|
||||
$nbofjobs=count($qualifiedjobs);
|
||||
$nbofjobslaunchedok=0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user