1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-16 02:26:25 +02:00

Standard function to search/load admin LAN files

This commit is contained in:
e107steved 2008-08-11 20:45:01 +00:00
parent fc4f530359
commit aff803dff4
2 changed files with 21 additions and 13 deletions

View File

@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/class2.php,v $
| $Revision: 1.63 $
| $Date: 2008-08-03 08:00:19 $
| $Revision: 1.64 $
| $Date: 2008-08-11 20:45:01 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@ -1574,14 +1574,29 @@ function e107_require($fname) {
return $ret;
}
function include_lan($path, $force = false) {
if (!is_readable($path)) {
function include_lan($path, $force = false)
{
if (!is_readable($path))
{
$path = str_replace(e_LANGUAGE, 'English', $path);
}
$ret = ($force) ? include($path) : include_once($path);
return (isset($ret)) ? $ret : "";
}
// Searches a defined set of paths and file names to load language files used for admin (including install etc)
function include_lan_admin($path)
{
include_lan($path.'languages/'.e_LANGUAGE.'/lan_config.php');
include_lan($path.'languages/admin/'.e_LANGUAGE.'.php');
}
if(!function_exists("print_a"))
{
function print_a($var, $return = false)

View File

@ -12,8 +12,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/header.php,v $
| $Revision: 1.16 $
| $Date: 2008-08-10 16:06:15 $
| $Revision: 1.17 $
| $Date: 2008-08-11 20:45:01 $
| $Author: e107steved $
+---------------------------------------------------------------+
*/
@ -460,13 +460,6 @@ function admin_purge_related($table, $id)
}
// Searches a defined set of paths and file names to load language files used for admin (including install etc)
function include_lan_admin($path)
{
include_lan($path.'languages/'.e_LANGUAGE.'/lan_config.php');
include_lan($path.'languages/admin/'.e_LANGUAGE.'.php');
}
$sql->db_Mark_Time('Parse Admin Header');
if (strpos(e_SELF.'?'.e_QUERY, 'menus.php?configure') === FALSE) {