[-] 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
|
else
|
||||||
return true;
|
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()
|
public function processStatus()
|
||||||
{
|
{
|
||||||
if (Validate::isLoadedObject($object = $this->loadObject()))
|
$return = parent::processStatus();
|
||||||
Country::addModuleRestrictions(array(), array(array('id_country' => $object->id)), array());
|
if (Validate::isLoadedObject($object = $this->loadObject()) && $object->active == 1)
|
||||||
|
$return &= Country::addModuleRestrictions(array(), array(array('id_country' => $object->id)), array());
|
||||||
parent::processStatus();
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function processBulkStatusSelection($way)
|
public function processBulkStatusSelection($way)
|
||||||
|
|||||||
Reference in New Issue
Block a user