mirror of
https://github.com/e107inc/e107.git
synced 2025-08-13 01:54:12 +02:00
Removed the json_compat_handler.php and some unused methods.
This commit is contained in:
@@ -1133,116 +1133,6 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
|
||||
}
|
||||
|
||||
|
||||
// Function renders all the plugin links according to the required icon size and layout style
|
||||
// - common to the various admin layouts such as infopanel, classis etc.
|
||||
/**
|
||||
* @deprecated
|
||||
* @param string $iconSize
|
||||
* @param string $linkStyle
|
||||
* @return array|string
|
||||
*/
|
||||
function pluginLinksOld($iconSize = E_16_PLUGMANAGER, $linkStyle = 'adminb')
|
||||
{
|
||||
trigger_error('<b>'.__METHOD__.' is deprecated.</b>', E_USER_DEPRECATED); // NO LAN
|
||||
|
||||
$sql = e107::getDb();
|
||||
$tp = e107::getParser();
|
||||
|
||||
|
||||
$plug_id = array();
|
||||
$plugin_array = array();
|
||||
e107::getDb()->select("plugin", "*", "plugin_installflag = 1"); // Grab plugin IDs.
|
||||
while ($row = e107::getDb()->fetch())
|
||||
{
|
||||
$pth = $row['plugin_path'];
|
||||
$plug_id[$pth] = $row['plugin_id'];
|
||||
}
|
||||
|
||||
$pref = e107::getConfig('core')->getPref();
|
||||
|
||||
$text = $this->renderAdminButton(e_ADMIN."plugin.php", ADLAN_98, ADLAN_99, "Z", $iconSize, $linkStyle);
|
||||
|
||||
$plugs = e107::getObject('e107plugin');
|
||||
|
||||
|
||||
|
||||
if(!empty($pref['plug_installed']))
|
||||
{
|
||||
foreach($pref['plug_installed'] as $plug=>$vers)
|
||||
{
|
||||
|
||||
$plugs->parse_plugin($plug);
|
||||
|
||||
|
||||
$plugin_path = $plug;
|
||||
$name = $plugs->plug_vars['@attributes']['name'];
|
||||
/*
|
||||
echo "<h1>".$name." ($plug)</h1>";
|
||||
print_a($plugs->plug_vars);
|
||||
*/
|
||||
|
||||
if(!varset($plugs->plug_vars['adminLinks']['link']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach($plugs->plug_vars['adminLinks']['link'] as $tag)
|
||||
{
|
||||
if(varset($tag['@attributes']['primary']) !== 'true')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!empty($pref['lan_global_list']) && !in_array($plugin_path, $pref['lan_global_list']))
|
||||
{
|
||||
e107::loadLanFiles($plugin_path, 'admin');
|
||||
}
|
||||
|
||||
$att = $tag['@attributes'];
|
||||
|
||||
|
||||
$eplug_name = $tp->toHTML($name,FALSE,"defs, emotes_off");
|
||||
$eplug_conffile = $att['url'];
|
||||
$eplug_icon_small = (!empty($att['iconSmall'])) ? $plugin_path.'/'.$att['iconSmall'] : '';
|
||||
$eplug_icon = (!empty($att['icon'])) ? $plugin_path.'/'.$att['icon'] : '';
|
||||
$eplug_caption = str_replace("'", '', $tp->toHTML($att['description'], FALSE, 'defs, emotes_off'));
|
||||
|
||||
if (varset($eplug_conffile))
|
||||
{
|
||||
$eplug_name = $tp->toHTML($eplug_name,FALSE,"defs, emotes_off");
|
||||
$plugin_icon = $eplug_icon_small ? "<img class='icon S16' src='".e_PLUGIN_ABS.$eplug_icon_small."' alt='' />" : E_16_PLUGIN;
|
||||
$plugin_icon_32 = $eplug_icon ? "<img class='icon S32' src='".e_PLUGIN_ABS.$eplug_icon."' alt='' />" : E_32_PLUGIN;
|
||||
$plugin_array['p-'.$plugin_path] = array(
|
||||
'key' => 'p-'.$plugin_path,
|
||||
'link' => e_PLUGIN.$plugin_path."/".$eplug_conffile,
|
||||
'title' => $eplug_name,
|
||||
'caption' => $eplug_caption,
|
||||
'perms' => "P".varset($plug_id[$plugin_path]),
|
||||
'icon' => $plugin_icon,
|
||||
'icon_32' => $plugin_icon_32,
|
||||
'cat' => $this->plugCatToCoreCat($plugs->plug_vars['category'])
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ksort($plugin_array, SORT_STRING); // To FIX, without changing the current key format, sort by 'title'
|
||||
|
||||
if($linkStyle === "array" || $iconSize === 'assoc')
|
||||
{
|
||||
return $plugin_array;
|
||||
}
|
||||
|
||||
foreach ($plugin_array as $plug_key => $plug_value)
|
||||
{
|
||||
$the_icon = ($iconSize == E_16_PLUGMANAGER) ? $plug_value['icon'] : $plug_value['icon_32'];
|
||||
$text .= $this->renderAdminButton($plug_value['link'], $plug_value['title'], $plug_value['caption'], $plug_value['perms'], $the_icon, $linkStyle);
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* XXX the NEW version of e_admin_menu();
|
||||
|
Reference in New Issue
Block a user