[-] Fix bug #PSCFV-8109 country creation/activation regarding payment modules restrictions
This commit is contained in:
+7
-1
@@ -370,4 +370,10 @@ class CountryCore extends ObjectModel
|
||||
else
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public function add($autodate = true, $null_values = false)
|
||||
{
|
||||
$return = parent::add($autodate, $null_values) && self::addModuleRestrictions(array(), array(array('id_country' => $this->id)), array());
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
@@ -433,10 +433,10 @@ class AdminCountriesControllerCore extends AdminController
|
||||
|
||||
public function processStatus()
|
||||
{
|
||||
if (Validate::isLoadedObject($object = $this->loadObject()))
|
||||
Country::addModuleRestrictions(array(), array(array('id_country' => $object->id)), array());
|
||||
|
||||
parent::processStatus();
|
||||
$return = parent::processStatus();
|
||||
if (Validate::isLoadedObject($object = $this->loadObject()) && $object->active == 1)
|
||||
$return &= Country::addModuleRestrictions(array(), array(array('id_country' => $object->id)), array());
|
||||
return $return;
|
||||
}
|
||||
|
||||
public function processBulkStatusSelection($way)
|
||||
|
||||
Reference in New Issue
Block a user