mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
Extended admin-ui error log messages.
This commit is contained in:
parent
05fda0cf1f
commit
3fef376cce
@ -2576,9 +2576,18 @@ class e_front_model extends e_model
|
||||
$this->_db_errno = $sql->getLastErrorNumber();
|
||||
$this->_db_errmsg = $sql->getLastErrorText();
|
||||
$this->_db_qry = $sql->getLastQuery();
|
||||
|
||||
if($this->_db_errno)
|
||||
{
|
||||
$this->addMessageError('SQL Select Error', $session_messages); //TODO - Lan
|
||||
$data = array(
|
||||
'error_no' => $this->_db_errno,
|
||||
'error_msg' => $this->_db_errmsg,
|
||||
'qry' => $this->_db_qry,
|
||||
'url' => e_REQUEST_URI,
|
||||
);
|
||||
|
||||
|
||||
$this->addMessageError('SQL Select Error', false, $data); //TODO - Lan
|
||||
// already done by the parent
|
||||
//$this->addMessageDebug('SQL Error #'.$this->_db_errno.': '.$sql->getLastErrorText());
|
||||
}
|
||||
@ -2805,7 +2814,14 @@ class e_front_model extends e_model
|
||||
|
||||
if($this->_db_errno)
|
||||
{
|
||||
$this->addMessageError('SQL Update Error', $session_messages); //TODO - Lan
|
||||
$data = array(
|
||||
'error_no' => $this->_db_errno,
|
||||
'error_msg' => $this->_db_errmsg,
|
||||
'qry' => $this->_db_qry,
|
||||
'url' => e_REQUEST_URI,
|
||||
);
|
||||
|
||||
$this->addMessageError('SQL Update Error', $session_messages, $data); //TODO - Lan
|
||||
$this->addMessageDebug('SQL Error #'.$this->_db_errno.': '.$sql->getLastErrorText());
|
||||
return false;
|
||||
}
|
||||
@ -3061,7 +3077,7 @@ class e_admin_model extends e_front_model
|
||||
{
|
||||
$logData = ($table != 'admin_log') ? array('TABLE'=>$table, 'ERROR'=>$this->_db_errmsg, 'QRY'=> print_r($this->_db_qry,true)) : false;
|
||||
|
||||
$this->addMessageError('SQL Replace Error', $session_messages); //TODO - Lan
|
||||
$this->addMessageError('SQL Replace Error', $session_messages, $logData); //TODO - Lan
|
||||
$this->addMessageDebug('SQL Error #'.$this->_db_errno.': '.$sql->getLastErrorText());
|
||||
}
|
||||
}
|
||||
@ -3873,7 +3889,7 @@ class e_front_tree_model extends e_tree_model
|
||||
if($sanitize)
|
||||
{
|
||||
$ids = array_map(array($tp, 'toDB'), $ids);
|
||||
$field = $tp->toDb($field);
|
||||
$field = $tp->toDB($field);
|
||||
$value = "'".$tp->toDB($value)."'";
|
||||
}
|
||||
$idstr = implode(', ', $ids);
|
||||
@ -3887,7 +3903,15 @@ class e_front_tree_model extends e_tree_model
|
||||
{
|
||||
if($sql->getLastErrorNumber())
|
||||
{
|
||||
$this->addMessageError(LAN_UPDATED_FAILED, $session_messages);
|
||||
$data = array(
|
||||
'error_no' => $this->_db_errno,
|
||||
'error_msg' => $this->_db_errmsg,
|
||||
'qry' => $this->_db_qry,
|
||||
'url' => e_REQUEST_URI,
|
||||
);
|
||||
|
||||
|
||||
$this->addMessageError(LAN_UPDATED_FAILED, $session_messages, $data);
|
||||
$this->addMessageDebug('SQL Error #'.$sql->getLastErrorNumber().': '.$sql->getLastErrorText());
|
||||
}
|
||||
else
|
||||
@ -3959,7 +3983,15 @@ class e_admin_tree_model extends e_front_tree_model
|
||||
{
|
||||
if($sql->getLastErrorNumber())
|
||||
{
|
||||
$this->addMessageError('SQL Delete Error: ' . $sql->getLastQuery(), $session_messages); //TODO - Lan
|
||||
$data = array(
|
||||
'error_no' => $this->_db_errno,
|
||||
'error_msg' => $this->_db_errmsg,
|
||||
'qry' => $this->_db_qry,
|
||||
'url' => e_REQUEST_URI,
|
||||
);
|
||||
|
||||
|
||||
$this->addMessageError('SQL Delete Error: ' . $sql->getLastQuery(), $session_messages, $data); //TODO - Lan
|
||||
$this->addMessageDebug('SQL Error #'.$sql->getLastErrorNumber().': '.$sql->getLastErrorText());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user