Skip to content
Snippets Groups Projects
Commit f3ceedfe authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

FIX syntax error with pgsql and frequency lost during cron update.

parent 04b6c30b
No related branches found
No related tags found
No related merge requests found
......@@ -380,7 +380,7 @@ if (($action=="create") || ($action=="edit"))
print '<tr class="blockmethod"><td>';
print $langs->trans('CronArgs')."</td><td>";
print "<input type=\"text\" size=\"20\" name=\"params\" value=\"".$object->params."\" /> ";
print "<input type=\"text\" class=\"quatrevingtpercent\" name=\"params\" value=\"".$object->params."\" /> ";
print "</td>";
print "<td>";
print $form->textwithpicto('',$langs->trans("CronArgsHelp"),1,'help');
......@@ -408,10 +408,10 @@ if (($action=="create") || ($action=="edit"))
print '<tr><td class="fieldrequired">';
print $langs->trans('CronEvery')."</td>";
print "<td>";
print "<select name=\"nbfrequency\">";
for($i=1; $i<=60; $i++)
print '<select name="nbfrequency">';
for ($i=1; $i<=60; $i++)
{
if (! empty($object->unitfrequency) && ($object->frequency/$object->unitfrequency) == $i)
if ($object->frequency == $i)
{
print "<option value='".$i."' selected>".$i."</option>";
}
......
......@@ -194,12 +194,12 @@ class Cronjob extends CommonObject
$sql.= " ".(! isset($this->md5params)?'NULL':"'".$this->db->escape($this->md5params)."'").",";
$sql.= " ".(! isset($this->module_name)?'NULL':"'".$this->db->escape($this->module_name)."'").",";
$sql.= " ".(! isset($this->priority)?'0':$this->priority).",";
$sql.= " ".(! isset($this->datelastrun) || dol_strlen($this->datelastrun)==0?'NULL':$this->db->idate($this->datelastrun)).",";
$sql.= " ".(! isset($this->datenextrun) || dol_strlen($this->datenextrun)==0?'NULL':$this->db->idate($this->datenextrun)).",";
$sql.= " ".(! isset($this->dateend) || dol_strlen($this->dateend)==0?'NULL':$this->db->idate($this->dateend)).",";
$sql.= " ".(! isset($this->datestart) || dol_strlen($this->datestart)==0?'NULL':$this->db->idate($this->datestart)).",";
$sql.= " ".(! isset($this->datelastrun) || dol_strlen($this->datelastrun)==0?'NULL':"'".$this->db->idate($this->datelastrun)."'").",";
$sql.= " ".(! isset($this->datenextrun) || dol_strlen($this->datenextrun)==0?'NULL':"'".$this->db->idate($this->datenextrun)."'").",";
$sql.= " ".(! isset($this->dateend) || dol_strlen($this->dateend)==0?'NULL':"'".$this->db->idate($this->dateend)."'").",";
$sql.= " ".(! isset($this->datestart) || dol_strlen($this->datestart)==0?'NULL':"'".$this->db->idate($this->datestart)."'").",";
$sql.= " ".(! isset($this->lastresult)?'NULL':"'".$this->db->escape($this->lastresult)."'").",";
$sql.= " ".(! isset($this->datelastresult) || dol_strlen($this->datelastresult)==0?'NULL':$this->db->idate($this->datelastresult)).",";
$sql.= " ".(! isset($this->datelastresult) || dol_strlen($this->datelastresult)==0?'NULL':"'".$this->db->idate($this->datelastresult)."'").",";
$sql.= " ".(! isset($this->lastoutput)?'NULL':"'".$this->db->escape($this->lastoutput)."'").",";
$sql.= " ".(! isset($this->unitfrequency)?'NULL':"'".$this->unitfrequency."'").",";
$sql.= " ".(! isset($this->frequency)?'0':$this->frequency).",";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment