mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 14:46:56 +02:00
Issue #73 Deprecated admin_handlers.php file.
This commit is contained in:
@@ -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();
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -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')
|
||||
{
|
||||
|
@@ -85,7 +85,7 @@ function imageselector_shortcode($parm = '', $mod = '')
|
||||
$text .= "\n<select{$multi}{$tabindex}{$class} name='{$name}' id='{$name_id}' onchange=\"replaceSC('imagepreview={$name}|{$width}|{$height}',this.form,'{$name_id}_prev'); \">
|
||||
<option value=''>".$label."</option>\n";
|
||||
|
||||
require_once(e_HANDLER.'admin_handler.php');
|
||||
|
||||
foreach ($imagelist as $imagedirlabel => $icons)
|
||||
{
|
||||
if(!vartrue($parms['media'])) $imagedirlabel = str_replace('../', '', $tp->replaceConstants($imagedirlabel));
|
||||
|
@@ -59,7 +59,6 @@ if($scaction == 'select' || $scaction == 'all')
|
||||
$text .= "<select{$multi}{$tabindex}{$class} name='{$name}' id='{$name_id}' onchange=\"replaceSC('imagepreview={$name}|{$width}|{$height}',this.form,'{$name_id}_prev'); \">
|
||||
<option value=''>".$label."</option>\n";
|
||||
|
||||
require_once(e_HANDLER.'admin_handler.php');
|
||||
foreach($imagelist as $imagedirlabel => $icons)
|
||||
{
|
||||
|
||||
|
@@ -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");
|
||||
|
||||
|
@@ -5152,7 +5152,7 @@ class e_admin_form_ui extends e_form
|
||||
<div class='navbar navbar-inner left' style='padding-left:30px; padding-top:6px; margin-top:-20px;border-top:0px'>
|
||||
<img src='".e_IMAGE_ABS."generic/branchbottom.gif' alt='' class='icon action' />
|
||||
".$this->select_open('etrigger_batch', array('class' => 'tbox select batch e-autosubmit reset', 'id' => false))."
|
||||
".$this->option(LAN_BATCH_LABEL_SELECTED, '')."
|
||||
".$this->option(LAN_BATCH_LABEL_SELECTED, '', false, 'disabled=1')."
|
||||
".($allow_copy ? $this->option(LAN_COPY, 'copy', false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"')) : '')."
|
||||
".($allow_delete ? $this->option(LAN_DELETE, 'delete', false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"')) : '')."
|
||||
".($allow_url ? $this->option(LAN_UI_BATCH_CREATELINK, 'url', false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"')) : '')."
|
||||
|
@@ -240,4 +240,61 @@ function echo_gzipped_page()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
@@ -149,7 +149,6 @@ class e107
|
||||
'e_admin_controller_ui' => '{e_HANDLER}admin_ui.php',
|
||||
'e_admin_dispatcher' => '{e_HANDLER}admin_ui.php',
|
||||
'e_admin_form_ui' => '{e_HANDLER}admin_ui.php',
|
||||
// 'e_admin_icons' => '{e_HANDLER}admin_handler.php', // DEPRECATED
|
||||
'e_admin_log' => '{e_HANDLER}admin_log_class.php',
|
||||
'e_admin_model' => '{e_HANDLER}model_class.php',
|
||||
'e_admin_request' => '{e_HANDLER}admin_ui.php',
|
||||
@@ -162,6 +161,7 @@ class e107
|
||||
'e_media' => '{e_HANDLER}media_class.php',
|
||||
'e_menu' => '{e_HANDLER}menu_class.php',
|
||||
'e_model' => '{e_HANDLER}model_class.php',
|
||||
'e_navigation' => '{e_HANDLER}sitelinks_class.php',
|
||||
'e_news_item' => '{e_HANDLER}news_class.php',
|
||||
'e_news_tree' => '{e_HANDLER}news_class.php',
|
||||
'e_object' => '{e_HANDLER}model_class.php',
|
||||
@@ -202,7 +202,6 @@ class e107
|
||||
'redirection' => '{e_HANDLER}redirection_class.php',
|
||||
'secure_image' => '{e_HANDLER}secure_img_handler.php',
|
||||
'sitelinks' => '{e_HANDLER}sitelinks_class.php',
|
||||
'e_navigation' => '{e_HANDLER}sitelinks_class.php',
|
||||
'themeHandler' => '{e_HANDLER}theme_handler.php',
|
||||
'user_class' => '{e_HANDLER}userclass_class.php',
|
||||
'userlogin' => '{e_HANDLER}login.php',
|
||||
|
@@ -1144,7 +1144,7 @@ class e_menuManager {
|
||||
//FIXME extract
|
||||
extract($row);
|
||||
if(!$menu_id){ return; }
|
||||
// include_once(e_HANDLER.'admin_handler.php');
|
||||
|
||||
$menu_name = preg_replace("#_menu#i", "", $menu_name);
|
||||
//TODO we need a CSS class for this
|
||||
$vis = ($menu_class || strlen($menu_pages) > 1) ? " <span class='required'>*</span> " : "";
|
||||
|
@@ -721,7 +721,6 @@ class e_navigation
|
||||
|
||||
if($mode == 'assoc')
|
||||
{
|
||||
require_once(e_HANDLER.'admin_handler.php');
|
||||
$newarray = asortbyindex($array_functions, 1);
|
||||
$array_functions_assoc = $this->convert_core_icons($newarray);
|
||||
return $array_functions_assoc;
|
||||
|
@@ -22,10 +22,6 @@ if (ADMIN == TRUE)
|
||||
$tp = e107::getParser();
|
||||
$pref = e107::getPref();
|
||||
$ns = e107::getRender();
|
||||
|
||||
// require_once(e_HANDLER."userclass_class.php");
|
||||
// require_once(e_ADMIN."ad_links.php");
|
||||
require_once(e_HANDLER.'admin_handler.php');
|
||||
|
||||
$nav = e107::getNav();
|
||||
|
||||
|
@@ -12,7 +12,6 @@
|
||||
* $Id: admin.php 12212 2011-05-11 22:25:02Z e107coders $
|
||||
*/
|
||||
|
||||
//require_once(e_HANDLER.'admin_handler.php'); - autoloaded - see class2.php __autoload()
|
||||
if (!defined('e107_INIT')){ exit; }
|
||||
|
||||
class plugin_download_admin extends e_admin_dispatcher
|
||||
|
@@ -5,7 +5,7 @@ if (ADMIN) {
|
||||
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) {
|
||||
list($cat_link, $anchor) = explode('#', $cat_link, 2);
|
||||
|
||||
|
Reference in New Issue
Block a user