1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 04:10:38 +02:00

plugin language files autoload - backward compatibility, also #15 related

This commit is contained in:
SecretR
2012-11-30 14:46:21 +02:00
parent 84eec7cdbb
commit f1c42c5b84
2 changed files with 20 additions and 7 deletions

View File

@@ -20,10 +20,23 @@ if (!defined('e107_INIT'))
header('Content-type: text/html; charset=utf-8', TRUE);
### Language files
e107::coreLan('header', true);
e107::coreLan('footer', true);
// DEPRECATED - plugins should load their lans manually
// plugin autoload, will be removed in the future!
// here mostly because of BC reasons
$_plugins = e107::getPref('plug_installed');
if(is_array($_plugins) && count($_plugins) > 0)
{
$_plugins = array_keys($_plugins);
foreach ($_plugins as $_p)
{
e107::loadLanFiles($_p, 'admin');
}
}
// Get Icon constants, theme override (theme/templates/admin_icons_template.php) is allowed
include_once(e107::coreTemplatePath('admin_icons'));
@@ -383,4 +396,3 @@ if (!function_exists("parse_admin"))
}
}
}

View File

@@ -1224,7 +1224,7 @@ class admin_shortcodes
$tmpl = strtoupper(varset($parms['tmpl'], 'E_ADMIN_NAVIGATION'));
global $$tmpl;
require(e_ADMIN.'ad_links.php');
require_once(e_ADMIN.'ad_links.php');
require_once(e_HANDLER.'admin_handler.php');
if($parm == 'home' || $parm == 'logout' || $parm == 'language')
@@ -1313,12 +1313,13 @@ class admin_shortcodes
{
$plug_vars = $plug->plug_vars;
if($row['plugin_path']=='tinymce')
{
//if($row['plugin_path']=='tinymce')
//{
// print_a($plug_vars);
}
//}
e107::loadLanFiles($row['plugin_path'], 'admin');
// moved to boot.php
// e107::loadLanFiles($row['plugin_path'], 'admin');
if(varset($plug_vars['adminLinks']['link']))
{