From fdf78c92a4b29805836c6e527e0c8d3c5d1e36d1 Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 26 Feb 2013 17:17:31 -0800 Subject: [PATCH] Issue #73 Deprecated admin_handlers.php file. --- e107_admin/admin.php | 1 - e107_admin/includes/tabbed.php | 1 - .../shortcodes/batch/admin_shortcodes.php | 4 +- e107_core/shortcodes/single/imageselector.php | 2 +- e107_core/shortcodes/single/imageselector.sc | 1 - e107_handlers/admin_handler.php | 56 +----------------- e107_handlers/admin_ui.php | 2 +- e107_handlers/core_functions.php | 57 +++++++++++++++++++ e107_handlers/e107_class.php | 3 +- e107_handlers/menumanager_class.php | 2 +- e107_handlers/sitelinks_class.php | 1 - e107_plugins/admin_menu/admin_menu.php | 4 -- e107_plugins/download/includes/admin.php | 1 - e107_themes/core/admin_alt_nav.sc | 2 +- 14 files changed, 65 insertions(+), 72 deletions(-) diff --git a/e107_admin/admin.php b/e107_admin/admin.php index 374565dd3..f1d3fd97c 100644 --- a/e107_admin/admin.php +++ b/e107_admin/admin.php @@ -42,7 +42,6 @@ if(strpos($pref['adminstyle'], 'infopanel') === 0) require_once(e_ADMIN.'boot.php'); require_once(e_ADMIN.'auth.php'); -require_once(e_HANDLER.'admin_handler.php'); require_once(e_HANDLER.'upload_handler.php'); // require_once (e_HANDLER."message_handler.php"); $mes = e107::getMessage(); diff --git a/e107_admin/includes/tabbed.php b/e107_admin/includes/tabbed.php index e183c0aa4..1d3bc176e 100644 --- a/e107_admin/includes/tabbed.php +++ b/e107_admin/includes/tabbed.php @@ -28,7 +28,6 @@ class tabbed $plugs = e107::getNav()->pluginLinks(E_16_PLUGMANAGER, "array"); $this->links = array_merge($core,$plugs); - require_once(e_HANDLER."admin_handler.php"); $this->links = multiarray_sort($this->links,'title'); //XXX Move this function in e107_class? $this->render(); } diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php index 21a7fa07b..d0f5cdb1e 100644 --- a/e107_core/shortcodes/batch/admin_shortcodes.php +++ b/e107_core/shortcodes/batch/admin_shortcodes.php @@ -1082,8 +1082,7 @@ class admin_shortcodes global $sql, $pref, $tp; parse_str($parm); require(e_ADMIN.'ad_links.php'); - require_once(e_HANDLER.'admin_handler.php'); - + function adnav_cat($cat_title, $cat_link, $cat_img, $cat_id=FALSE) { @@ -1286,7 +1285,6 @@ class admin_shortcodes global $$tmpl; require_once(e_ADMIN.'ad_links.php'); //FIXME loaded in boot.php but $admin_cat is not available here. - require_once(e_HANDLER.'admin_handler.php'); if($parm == 'home' || $parm == 'logout' || $parm == 'language' || $parm == 'pm') { diff --git a/e107_core/shortcodes/single/imageselector.php b/e107_core/shortcodes/single/imageselector.php index b63a657a6..c0d966d30 100644 --- a/e107_core/shortcodes/single/imageselector.php +++ b/e107_core/shortcodes/single/imageselector.php @@ -85,7 +85,7 @@ function imageselector_shortcode($parm = '', $mod = '') $text .= "\n \n"; - require_once(e_HANDLER.'admin_handler.php'); + foreach ($imagelist as $imagedirlabel => $icons) { if(!vartrue($parms['media'])) $imagedirlabel = str_replace('../', '', $tp->replaceConstants($imagedirlabel)); diff --git a/e107_core/shortcodes/single/imageselector.sc b/e107_core/shortcodes/single/imageselector.sc index 47367d752..26fabfea5 100644 --- a/e107_core/shortcodes/single/imageselector.sc +++ b/e107_core/shortcodes/single/imageselector.sc @@ -59,7 +59,6 @@ if($scaction == 'select' || $scaction == 'all') $text .= " \n"; - require_once(e_HANDLER.'admin_handler.php'); foreach($imagelist as $imagedirlabel => $icons) { diff --git a/e107_handlers/admin_handler.php b/e107_handlers/admin_handler.php index ce69ae9d0..de3a7f740 100644 --- a/e107_handlers/admin_handler.php +++ b/e107_handlers/admin_handler.php @@ -16,58 +16,6 @@ if (!defined('e107_INIT')) { exit; } -// Better Array-sort by key function by acecream (22-Apr-2003 11:02) http://php.net/manual/en/function.asort.php -if (!function_exists('asortbyindex')) -{ - function asortbyindex($array, $key) - { - foreach ($array as $i => $k) - { - $sort_values[$i] = $array[$i][$key]; - } - asort ($sort_values); - reset ($sort_values); - while (list ($arr_key, $arr_val) = each ($sort_values)) - { - $sorted_arr[] = $array[$arr_key]; - } - return $sorted_arr; - } -} - -if (!function_exists('multiarray_sort')) { - function multiarray_sort(&$array, $key, $order = 'asc', $natsort = true, $case = true) - { - if(!is_array($array)) return $array; - - $order = strtolower($order); - foreach ($array as $i => $arr) - { - $sort_values[$i] = $arr[$key]; - } - - if(!$natsort) - { - ($order=='asc')? asort($sort_values) : arsort($sort_values); - } - elseif(isset($sort_values)) - { - $case ? natsort($sort_values) : natcasesort($sort_values); - if($order != 'asc') $sort_values = array_reverse($sort_values, true); - } - - if(!isset($sort_values)) - { - return; - } - - reset ($sort_values); - - while (list ($arr_key, $arr_val) = each ($sort_values)) - { - $sorted_arr[] = $array[$arr_key]; - } - return $sorted_arr; - } -} +// DEBUG INFO ONLY - do NOT translate. +e107::getMessage()->addDebug("admin_handler.php is deprecated. You can simply remove it from your script and continue to use its functions which can now be found inside core_functions.php"); diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index d2e636039..402865a7a 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -5152,7 +5152,7 @@ class e_admin_form_ui extends e_form