// No more mysql_error() hard coded !
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7651 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -712,7 +712,7 @@ abstract class AdminTabCore
|
||||
$object = new $this->className();
|
||||
$this->copyFromPost($object, $this->table);
|
||||
if (!$object->add())
|
||||
$this->_errors[] = Tools::displayError('An error occurred while creating object.').' <b>'.$this->table.' ('.mysql_error().')</b>';
|
||||
$this->_errors[] = Tools::displayError('An error occurred while creating object.').' <b>'.$this->table.' ('.Db::getInstance()->getMsgError().')</b>';
|
||||
elseif (($_POST[$this->identifier] = $object->id /* voluntary */) AND $this->postImage($object->id) AND !sizeof($this->_errors) AND $this->_redirect)
|
||||
{
|
||||
$parent_id = (int)(Tools::getValue('id_parent', 1));
|
||||
|
||||
+2
-3
@@ -204,7 +204,7 @@ class MySQLCore extends Db
|
||||
return mysql_insert_id($this->_link);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public function Affected_Rows()
|
||||
{
|
||||
if ($this->_link)
|
||||
@@ -228,11 +228,10 @@ class MySQLCore extends Db
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the text of the error message from previous MySQL operation
|
||||
*
|
||||
* @acces public
|
||||
* @return string error
|
||||
*/
|
||||
public function getMsgError($query = false)
|
||||
|
||||
Reference in New Issue
Block a user