diff --git a/classes/helper/Helper.php b/classes/helper/Helper.php index 3ee633b15..b1a54869d 100755 --- a/classes/helper/Helper.php +++ b/classes/helper/Helper.php @@ -98,16 +98,7 @@ class HelperCore } /** - * Since 1.5 - This function will be deprecated in 1.6 - use Helper::renderCategoryTree() instead - * @static - * @param $translations - * @param array $selected_cat - * @param string $input_name - * @param bool $use_radio - * @param bool $use_search - * @param array $disabled_categories - * @param bool $use_in_popup - * @return mixed + * @deprecated 1.5.0 */ public static function renderAdminCategorieTree($translations, $selected_cat = array(), @@ -117,6 +108,8 @@ class HelperCore $disabled_categories = array(), $use_in_popup = false) { + Tools::displayAsDeprecated(); + $helper = new Helper(); if (isset($translations['Root'])) $root = $translations['Root']; @@ -169,7 +162,7 @@ class HelperCore 'Check All' => $this->l('Check All'), 'Uncheck All' => $this->l('Uncheck All'), 'search' => $this->l('Find a category') - ); + ); if (!$root) { @@ -180,22 +173,20 @@ class HelperCore if (!$use_radio) $input_name = $input_name.'[]'; - $context = Context::getContext(); - - $context->controller->addCSS(_PS_JS_DIR_.'jquery/plugins/treeview/jquery.treeview.css'); - $context->controller->addJs(array( + $this->context->controller->addCSS(_PS_JS_DIR_.'jquery/plugins/treeview/jquery.treeview.css'); + $this->context->controller->addJs(array( _PS_JS_DIR_.'jquery/plugins/treeview/jquery.treeview.js', _PS_JS_DIR_.'jquery/plugins/treeview/jquery.treeview.async.js', _PS_JS_DIR_.'jquery/plugins/treeview/jquery.treeview.edit.js', _PS_JS_DIR_.'admin-categories-tree.js')); if ($use_search) - $context->controller->addJs(_PS_JS_DIR_.'jquery/plugins/autocomplete/jquery.autocomplete.js'); + $this->context->controller->addJs(_PS_JS_DIR_.'jquery/plugins/autocomplete/jquery.autocomplete.js'); $html = '