// Fixed #PSTEST-453

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12530 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
bMancone
2012-01-18 14:10:52 +00:00
parent 7514b555c5
commit 3b2daa5d3d
2 changed files with 29 additions and 2 deletions
+10 -1
View File
@@ -163,6 +163,9 @@ class AddressCore extends ObjectModel
$this->country = Country::getNameById($id_lang ? $id_lang : Configuration::get('PS_LANG_DEFAULT'), $this->id_country);
}
/**
* @see ObjectModel::add()
*/
public function add($autodate = true, $null_values = false)
{
if (!parent::add($autodate, $null_values))
@@ -173,6 +176,9 @@ class AddressCore extends ObjectModel
return true;
}
/**
* @see ObjectModel::delete()
*/
public function delete()
{
if (Validate::isUnsignedId($this->id_customer))
@@ -200,6 +206,9 @@ class AddressCore extends ObjectModel
return $out;
}
/**
* @see ObjectModel::validateController()
*/
public function validateController($htmlentities = true)
{
$errors = parent::validateController($htmlentities);
@@ -296,7 +305,7 @@ class AddressCore extends ObjectModel
{
if (!$id_customer)
return false;
return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
SELECT `id_address`
FROM `'._DB_PREFIX_.'address`