mirror of
https://github.com/e107inc/e107.git
synced 2025-04-20 04:32:01 +02:00
Reduced the number of file includes. Only load admin language files when necessary.
This commit is contained in:
parent
b03abcff1f
commit
6811c479d1
@ -1941,6 +1941,8 @@ function include_lan_admin($path)
|
||||
//DEPRECATED - use e107::loadLanFiles();
|
||||
function loadLanFiles($unitName, $type='runtime')
|
||||
{
|
||||
$info = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,2);
|
||||
e107::getMessage()->addDebug("Using deprecated function loanLanFiles(). Replace with e107::loadLanFiles().".print_a($info,true));
|
||||
return e107::loadLanFiles($unitName, $type);
|
||||
}
|
||||
|
||||
|
@ -29,13 +29,18 @@ e107::coreLan('footer', true);
|
||||
// here mostly because of BC reasons
|
||||
//if(!deftrue('e_MINIMAL'))
|
||||
{
|
||||
|
||||
$_globalLans = e107::pref('core', 'lan_global_list');
|
||||
$_plugins = e107::getPref('plug_installed');
|
||||
if(is_array($_plugins) && count($_plugins) > 0)
|
||||
{
|
||||
$_plugins = array_keys($_plugins);
|
||||
|
||||
foreach ($_plugins as $_p)
|
||||
{
|
||||
if(in_array($_p, $_globalLans) && e_CURRENT_PLUGIN != $_p) // filter out those with globals unless we are in a plugin folder.
|
||||
{
|
||||
continue;
|
||||
}
|
||||
e107::loadLanFiles($_p, 'admin');
|
||||
}
|
||||
}
|
||||
@ -57,7 +62,7 @@ if(!defset('e_ADMIN_UI') && !defset('e_PAGETITLE'))
|
||||
$link = str_replace("../","",$val[0]);
|
||||
if(strpos(e_SELF,$link)!==FALSE)
|
||||
{
|
||||
define('e_PAGETITLE',$val[1]);
|
||||
// define('e_PAGETITLE',$val[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -825,7 +825,7 @@ class admin_shortcodes
|
||||
if (is_readable(e_PLUGIN.$plugin_path.'/plugin.xml'))
|
||||
{
|
||||
$readFile = $xml->loadXMLfile(e_PLUGIN.$plugin_path.'/plugin.xml', true, true);
|
||||
e107::loadLanFiles($plugin_path, 'admin');
|
||||
// e107::loadLanFiles($plugin_path, 'admin');
|
||||
$eplug_caption = $tp->toHTML($readFile['@attributes']['name'], FALSE, 'defs, emotes_off');
|
||||
$eplug_conffile = $readFile['administration']['configFile'];
|
||||
}
|
||||
|
@ -943,6 +943,8 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
|
||||
|
||||
$plugs = e107::getObject('e107plugin');
|
||||
|
||||
|
||||
|
||||
if(vartrue($pref['plug_installed']))
|
||||
{
|
||||
foreach($pref['plug_installed'] as $plug=>$vers)
|
||||
@ -969,8 +971,12 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
|
||||
{
|
||||
continue;
|
||||
}
|
||||
loadLanFiles($plugin_path, 'admin');
|
||||
|
||||
if(!in_array($plugin_path, $pref['lan_global_list']))
|
||||
{
|
||||
e107::loadLanFiles($plugin_path, 'admin');
|
||||
}
|
||||
|
||||
$att = $tag['@attributes'];
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user