diff --git a/admin-dev/themes/default/template/controllers/categories/list_header.tpl b/admin-dev/themes/default/template/controllers/categories/list_header.tpl
index 845c4ac0a..f59d98a0d 100644
--- a/admin-dev/themes/default/template/controllers/categories/list_header.tpl
+++ b/admin-dev/themes/default/template/controllers/categories/list_header.tpl
@@ -46,7 +46,14 @@
{if isset($delete_category) && $delete_category}
diff --git a/classes/AdminController.php b/classes/AdminController.php
index adb7a32b2..5eb4a5fe8 100644
--- a/classes/AdminController.php
+++ b/classes/AdminController.php
@@ -224,7 +224,7 @@ class AdminControllerCore extends Controller
*/
protected $filter;
protected $noLink;
- protected $specificConfirmDelete;
+ protected $specificConfirmDelete = null;
protected $colorOnBackground;
/** @var bool If true, activates color on hover */
protected $row_hover = true;
@@ -1343,7 +1343,7 @@ class AdminControllerCore extends Controller
'install_dir_exists' => file_exists(_PS_ADMIN_DIR_.'/../install'),
'is_multishop' => $is_multishop,
'pic_dir' => _THEME_PROD_PIC_DIR_,
- 'controller_name' => Tools::getValue('controller'),
+ 'controller_name' => Tools::getValue('controller'),
));
}
diff --git a/classes/helper/HelperList.php b/classes/helper/HelperList.php
index a5e7d8d71..0eb83cbde 100644
--- a/classes/helper/HelperList.php
+++ b/classes/helper/HelperList.php
@@ -94,7 +94,7 @@ class HelperListCore extends Helper
public $list_skip_actions = array();
public $bulk_actions = false;
- public $specificConfirmDelete;
+ public $specificConfirmDelete = null;
public $colorOnBackground;
/** @var bool If true, activates color on hover */
@@ -464,12 +464,16 @@ class HelperListCore extends Helper
if (!is_null($name))
$name = '\n\n'.self::$cache_lang['Name'].' '.$name;
- $tpl->assign(array_merge($this->tpl_delete_link_vars, array(
+ $data = array(
'href' => $this->currentIndex.'&'.$this->identifier.'='.$id.'&delete'.$this->table.'&token='.($token != null ? $token : $this->token),
- 'confirm' => (!is_null($this->specificConfirmDelete) ? '\r'.$this->specificConfirmDelete : self::$cache_lang['DeleteItem'].$name),
'action' => self::$cache_lang['Delete'],
- 'id' => $id,
- )));
+ 'id' => $id
+ );
+
+ if ($this->specificConfirmDelete !== false)
+ $data['confirm'] = !is_null($this->specificConfirmDelete) ? '\r'.$this->specificConfirmDelete : self::$cache_lang['DeleteItem'].$name;
+
+ $tpl->assign(array_merge($this->tpl_delete_link_vars, $data));
return $tpl->fetch();
}
diff --git a/controllers/admin/AdminCategoriesController.php b/controllers/admin/AdminCategoriesController.php
index 46bbfdfee..dba16e5b2 100644
--- a/controllers/admin/AdminCategoriesController.php
+++ b/controllers/admin/AdminCategoriesController.php
@@ -34,9 +34,9 @@ class AdminCategoriesControllerCore extends AdminController
public function __construct()
{
- $this->table = 'category';
+ $this->table = 'category';
$this->className = 'Category';
- $this->lang = true;
+ $this->lang = true;
$this->deleted = false;
$this->context = Context::getContext();
@@ -80,8 +80,9 @@ class AdminCategoriesControllerCore extends AdminController
)
);
- $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));
-
+ $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected')));
+ $this->specificConfirmDelete = false;
+
parent::__construct();
}