Fix: Add more log and missing error message

This commit is contained in:
Laurent Destailleur 2014-08-17 12:43:24 +02:00
parent 3f8ec47e91
commit b0ebaec0da
3 changed files with 10 additions and 8 deletions

View File

@ -473,7 +473,8 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'<br />';
}*/
}
if (isset($_POST["country"]) && $_POST["country"]=='0') {
if (isset($_POST["country"]) && $_POST["country"]=='0')
{
$ok=0;
setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")),'errors');
}
@ -532,7 +533,8 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$result = $db->query($sql);
if ($result) // Add is ok
{
$_POST=array('id'=>$id); // Clean $_POST array, we keep only
setEventMessage($langs->transnoentities("RecordSaved"));
$_POST=array('id'=>$id); // Clean $_POST array, we keep only
}
else
{

View File

@ -271,7 +271,7 @@ class DoliDBMysql extends DoliDB
$this->lastqueryerror = $query;
$this->lasterror = $this->error();
$this->lasterrno = $this->errno();
dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno, LOG_WARNING);
dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno." ".$this->lasterror, LOG_WARNING);
}
$this->lastquery=$query;
$this->_results = $ret;

View File

@ -273,7 +273,7 @@ class DoliDBMysqli extends DoliDB
$this->lastqueryerror = $query;
$this->lasterror = $this->error();
$this->lasterrno = $this->errno();
dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno, LOG_WARNING);
dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno." ".$this->lasterror, LOG_WARNING);
}
$this->lastquery=$query;
$this->_results = $ret;