// Context part 25

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7794 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-07-28 14:17:58 +00:00
parent a1a32714ab
commit d3b2ff2664
55 changed files with 432 additions and 535 deletions
+4 -5
View File
@@ -44,14 +44,14 @@ class AdminContact extends AdminPreferences
private function _getDefaultFieldsContent()
{
$context = Context::getContext();
$this->context = Context::getContext();
$countryList = array();
$countryList[] = array('id' => '0', 'name' => $this->l('Choose your country'));
foreach (Country::getCountries($context->language->id) AS $country)
foreach (Country::getCountries($this->context->language->id) AS $country)
$countryList[] = array('id' => $country['id_country'], 'name' => $country['name']);
$stateList = array();
$stateList[] = array('id' => '0', 'name' => $this->l('Choose your state (if applicable)'));
foreach (State::getStates($context->language->id) AS $state)
foreach (State::getStates($this->context->language->id) AS $state)
$stateList[] = array('id' => $state['id_state'], 'name' => $state['name']);
$formFields = array(
@@ -108,10 +108,9 @@ class AdminContact extends AdminPreferences
protected function _postConfig($fields)
{
$context = Context::getContext();
if (!$this->_errors && isset($_POST['PS_SHOP_COUNTRY_ID']))
{
$country = new Country($_POST['PS_SHOP_COUNTRY_ID'], $context->language->id);
$country = new Country($_POST['PS_SHOP_COUNTRY_ID'], $this->context->language->id);
Configuration::updateValue('PS_SHOP_COUNTRY', pSQL($country->name));
}
if (!$this->_errors && isset($_POST['PS_SHOP_STATE_ID']))