1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

Reduced the number of file includes. Only load admin language files when necessary.

This commit is contained in:
Cameron
2015-02-12 13:09:56 -08:00
parent b03abcff1f
commit 6811c479d1
4 changed files with 17 additions and 4 deletions

View File

@@ -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]);
}
}
}