// Debug use of HelperList with listKkip arrays
This commit is contained in:
1 parent
341b163aa1
commit
22c4fb2e99
1 file changed
+11
-10
+11
-10
@@ -982,20 +982,13 @@ class AdminControllerCore extends Controller
|
|||||||
$helper->header_tpl = $this->tpl_folder.'list_footer.tpl';
|
$helper->header_tpl = $this->tpl_folder.'list_footer.tpl';
|
||||||
|
|
||||||
// For compatibility reasons, we have to check standard actions in class attributes
|
// For compatibility reasons, we have to check standard actions in class attributes
|
||||||
foreach($this->actions_available as $action) {
|
foreach ($this->actions_available as $action)
|
||||||
|
{
|
||||||
if (!in_array($action, $this->actions) && isset($this->$action) && $this->$action)
|
if (!in_array($action, $this->actions) && isset($this->$action) && $this->$action)
|
||||||
$this->actions[] = $action;
|
$this->actions[] = $action;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
$helper->actions = $this->actions;
|
$helper->actions = $this->actions;
|
||||||
|
|
||||||
|
|
||||||
/*$helper->view = $this->view;
|
|
||||||
$helper->edit = $this->edit;
|
|
||||||
$helper->delete = $this->delete;
|
|
||||||
$helper->duplicate = $this->duplicate;*/
|
|
||||||
|
|
||||||
$helper->bulk_actions = $this->bulk_actions;
|
$helper->bulk_actions = $this->bulk_actions;
|
||||||
$helper->currentIndex = self::$currentIndex;
|
$helper->currentIndex = self::$currentIndex;
|
||||||
$helper->className = $this->className;
|
$helper->className = $this->className;
|
||||||
@@ -1006,8 +999,16 @@ class AdminControllerCore extends Controller
|
|||||||
$helper->token = $this->token;
|
$helper->token = $this->token;
|
||||||
$helper->imageType = $this->imageType;
|
$helper->imageType = $this->imageType;
|
||||||
$helper->no_add = isset($this->no_add) ? $this->no_add : false;
|
$helper->no_add = isset($this->no_add) ? $this->no_add : false;
|
||||||
$helper->_listSkipDelete = $this->_listSkipDelete;
|
|
||||||
$helper->colorOnBackground = $this->colorOnBackground;
|
$helper->colorOnBackground = $this->colorOnBackground;
|
||||||
|
|
||||||
|
// For each action, try to add the corresponding skip elements list
|
||||||
|
foreach ($this->actions as $action)
|
||||||
|
{
|
||||||
|
$skip_attribute = '_listSkip'.ucfirst($action);
|
||||||
|
if (isset($this->$skip_attribute))
|
||||||
|
$helper->$skip_attribute = $this->$skip_attribute;
|
||||||
|
}
|
||||||
|
|
||||||
$this->content .= $helper->generateList($this->_list, $this->fieldsDisplay);
|
$this->content .= $helper->generateList($this->_list, $this->fieldsDisplay);
|
||||||
}
|
}
|
||||||
else if ($this->display == 'options')
|
else if ($this->display == 'options')
|
||||||
|
|||||||
Reference in new issue
Block a user