// Context part 11

This commit is contained in:
tDidierjean
2011-07-18 15:50:58 +00:00
parent 4b7dee58b7
commit 6551a3ece7
60 changed files with 378 additions and 520 deletions
+2 -4
View File
@@ -52,8 +52,6 @@ class AdminStates extends AdminTab
/* Delete object */
if (isset($_GET['delete'.$this->table]))
{
global $currentIndex;
// set token
$token = Tools::getValue('token') ? Tools::getValue('token') : $this->token;
@@ -100,7 +98,7 @@ class AdminStates extends AdminTab
public function displayForm($isMainTab = true)
{
global $currentIndex, $cookie;
$context = Context::getContext();
parent::displayForm();
if (!($obj = $this->loadObject(true)))
@@ -123,7 +121,7 @@ class AdminStates extends AdminTab
<label>'.$this->l('Country:').' </label>
<div class="margin-form">
<select name="id_country">';
$countries = Country::getCountries((int)($cookie->id_lang), false, true);
$countries = Country::getCountries($context->language->id, false, true);
foreach ($countries AS $country)
echo '<option value="'.(int)($country['id_country']).'"'.(($this->getFieldValue($obj, 'id_country') == $country['id_country']) ? ' selected="selected"' : '').'>'.$country['name'].'</option>';
echo '