[-] BO : Fixed bug #PSFV-282. Add back the currentIndex and token global value for the modules compatibility

This commit is contained in:
vSchoener committed 2012-03-28 12:52:11 +00:00
1 parent 955d5e56c4
commit e4229db18d
1 file changed
+9
+9
View File
@@ -249,6 +249,9 @@ class AdminControllerCore extends Controller
public function __construct() public function __construct()
{ {
// Has to be remove for the next Prestashop version
global $token;
$this->controller_type = 'admin'; $this->controller_type = 'admin';
$this->controller_name = get_class($this); $this->controller_name = get_class($this);
if (strpos($this->controller_name, 'Controller')) if (strpos($this->controller_name, 'Controller'))
@@ -265,6 +268,8 @@ class AdminControllerCore extends Controller
$this->id = Tab::getIdFromClassName($this->controller_name); $this->id = Tab::getIdFromClassName($this->controller_name);
$this->token = Tools::getAdminToken($this->controller_name.(int)$this->id.(int)$this->context->employee->id); $this->token = Tools::getAdminToken($this->controller_name.(int)$this->id.(int)$this->context->employee->id);
$token = $this->token;
$this->_conf = array( $this->_conf = array(
1 => $this->l('Deletion successful'), 2 => $this->l('Selection successfully deleted'), 1 => $this->l('Deletion successful'), 2 => $this->l('Selection successfully deleted'),
3 => $this->l('Creation successful'), 4 => $this->l('Update successful'), 3 => $this->l('Creation successful'), 4 => $this->l('Update successful'),
@@ -1570,6 +1575,9 @@ class AdminControllerCore extends Controller
*/ */
public function init() public function init()
{ {
// Has to be removed for the next Prestashop version
global $currentIndex;
parent::init(); parent::init();
if (Tools::getValue('ajax')) if (Tools::getValue('ajax'))
@@ -1593,6 +1601,7 @@ class AdminControllerCore extends Controller
if ($back = Tools::getValue('back')) if ($back = Tools::getValue('back'))
$current_index .= '&back='.urlencode($back); $current_index .= '&back='.urlencode($back);
self::$currentIndex = $current_index; self::$currentIndex = $current_index;
$currentIndex = $current_index;
if ((int)Tools::getValue('liteDisplaying')) if ((int)Tools::getValue('liteDisplaying'))
{ {