// HelperList cleanup
This commit is contained in:
@@ -169,8 +169,8 @@ class HelperListCore extends Helper
|
|||||||
$tpl_enable = $this->createTemplate('list_action_enable.tpl');
|
$tpl_enable = $this->createTemplate('list_action_enable.tpl');
|
||||||
$tpl_enable->assign(array(
|
$tpl_enable->assign(array(
|
||||||
'enabled' => (bool)$value,
|
'enabled' => (bool)$value,
|
||||||
'url_enable' => $this->currentIndex.'&'.$this->identifier.'='.(int)$id.'&'.$active.$this->table.
|
'url_enable' => Tools::safeOutput($this->currentIndex.'&'.$this->identifier.'='.(int)$id.'&'.$active.$this->table.
|
||||||
((int)$id_category && (int)$id_product ? '&id_category='.(int)$id_category : '').'&token='.($token != null ? $token : $this->token)
|
((int)$id_category && (int)$id_product ? '&id_category='.(int)$id_category : '').'&token='.($token != null ? $token : $this->token))
|
||||||
));
|
));
|
||||||
return $tpl_enable->fetch();
|
return $tpl_enable->fetch();
|
||||||
}
|
}
|
||||||
@@ -352,11 +352,11 @@ class HelperListCore extends Helper
|
|||||||
$duplicate = $this->currentIndex.'&'.$this->identifier.'='.$id.'&duplicate'.$this->table;
|
$duplicate = $this->currentIndex.'&'.$this->identifier.'='.$id.'&duplicate'.$this->table;
|
||||||
|
|
||||||
$tpl->assign(array(
|
$tpl->assign(array(
|
||||||
'href' => $this->currentIndex.'&'.$this->identifier.'='.$id.'&view'.$this->table.'&token='.($token != null ? $token : $this->token),
|
'href' => Tools::safeOutput($this->currentIndex.'&'.$this->identifier.'='.$id.'&view'.$this->table.'&token='.($token != null ? $token : $this->token)),
|
||||||
'action' => self::$cache_lang['Duplicate'],
|
'action' => self::$cache_lang['Duplicate'],
|
||||||
'confirm' => self::$cache_lang['Copy images too?'],
|
'confirm' => self::$cache_lang['Copy images too?'],
|
||||||
'location_ok' => $duplicate.'&token='.($token != null ? $token : $this->token),
|
'location_ok' => Tools::safeOutput($duplicate.'&token='.($token != null ? $token : $this->token)),
|
||||||
'location_ko' => $duplicate.'&noimage=1&token='.($token ? $token : $this->token),
|
'location_ko' => Tools::safeOutput($duplicate.'&noimage=1&token='.($token ? $token : $this->token)),
|
||||||
));
|
));
|
||||||
|
|
||||||
return $tpl->fetch();
|
return $tpl->fetch();
|
||||||
@@ -393,9 +393,9 @@ class HelperListCore extends Helper
|
|||||||
$ajax_params['action'] = 'details';
|
$ajax_params['action'] = 'details';
|
||||||
|
|
||||||
$tpl->assign(array(
|
$tpl->assign(array(
|
||||||
'id' => $id,
|
'id' => Tools::safeOutput($id),
|
||||||
'controller' => str_replace('Controller', '', get_class($this->context->controller)),
|
'controller' => str_replace('Controller', '', get_class($this->context->controller)),
|
||||||
'token' => $token != null ? $token : $this->token,
|
'token' => Tools::safeOutput($token != null ? $token : $this->token),
|
||||||
'action' => self::$cache_lang['Details'],
|
'action' => self::$cache_lang['Details'],
|
||||||
'params' => $ajax_params,
|
'params' => $ajax_params,
|
||||||
'json_params' => Tools::jsonEncode($ajax_params)
|
'json_params' => Tools::jsonEncode($ajax_params)
|
||||||
@@ -413,7 +413,7 @@ class HelperListCore extends Helper
|
|||||||
self::$cache_lang['View'] = $this->l('View', 'Helper');
|
self::$cache_lang['View'] = $this->l('View', 'Helper');
|
||||||
|
|
||||||
$tpl->assign(array(
|
$tpl->assign(array(
|
||||||
'href' => $this->currentIndex.'&'.$this->identifier.'='.$id.'&view'.$this->table.'&token='.($token != null ? $token : $this->token),
|
'href' => Tools::safeOutput($this->currentIndex.'&'.$this->identifier.'='.$id.'&view'.$this->table.'&token='.($token != null ? $token : $this->token)),
|
||||||
'action' => self::$cache_lang['View'],
|
'action' => self::$cache_lang['View'],
|
||||||
));
|
));
|
||||||
|
|
||||||
@@ -459,9 +459,8 @@ class HelperListCore extends Helper
|
|||||||
$name = '\n\n'.self::$cache_lang['Name'].' '.$name;
|
$name = '\n\n'.self::$cache_lang['Name'].' '.$name;
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
'href' => $this->currentIndex.'&'.$this->identifier.'='.$id.'&delete'.$this->table.'&token='.($token != null ? $token : $this->token),
|
'href' => Tools::safeOutput($this->currentIndex.'&'.$this->identifier.'='.$id.'&delete'.$this->table.'&token='.($token != null ? $token : $this->token)),
|
||||||
'action' => self::$cache_lang['Delete'],
|
'action' => self::$cache_lang['Delete'],
|
||||||
'id' => $id
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($this->specificConfirmDelete !== false)
|
if ($this->specificConfirmDelete !== false)
|
||||||
@@ -485,7 +484,6 @@ class HelperListCore extends Helper
|
|||||||
'href' => Tools::safeOutput($this->currentIndex.'&'.$this->identifier.'='.$id.'&delete'.$this->table.'&token='.($token != null ? $token : $this->token)),
|
'href' => Tools::safeOutput($this->currentIndex.'&'.$this->identifier.'='.$id.'&delete'.$this->table.'&token='.($token != null ? $token : $this->token)),
|
||||||
'action' => self::$cache_lang['Default'],
|
'action' => self::$cache_lang['Default'],
|
||||||
'name' => Tools::safeOutput($name),
|
'name' => Tools::safeOutput($name),
|
||||||
'id' => Tools::safeOutput($id),
|
|
||||||
)));
|
)));
|
||||||
|
|
||||||
return $tpl->fetch();
|
return $tpl->fetch();
|
||||||
|
|||||||
Reference in New Issue
Block a user