mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Standard function to search/load admin LAN files
This commit is contained in:
23
class2.php
23
class2.php
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/class2.php,v $
|
| $Source: /cvs_backup/e107_0.8/class2.php,v $
|
||||||
| $Revision: 1.63 $
|
| $Revision: 1.64 $
|
||||||
| $Date: 2008-08-03 08:00:19 $
|
| $Date: 2008-08-11 20:45:01 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -1574,14 +1574,29 @@ function e107_require($fname) {
|
|||||||
return $ret;
|
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);
|
$path = str_replace(e_LANGUAGE, 'English', $path);
|
||||||
}
|
}
|
||||||
$ret = ($force) ? include($path) : include_once($path);
|
$ret = ($force) ? include($path) : include_once($path);
|
||||||
return (isset($ret)) ? $ret : "";
|
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"))
|
if(!function_exists("print_a"))
|
||||||
{
|
{
|
||||||
function print_a($var, $return = false)
|
function print_a($var, $return = false)
|
||||||
|
@@ -12,8 +12,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_admin/header.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_admin/header.php,v $
|
||||||
| $Revision: 1.16 $
|
| $Revision: 1.17 $
|
||||||
| $Date: 2008-08-10 16:06:15 $
|
| $Date: 2008-08-11 20:45:01 $
|
||||||
| $Author: e107steved $
|
| $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');
|
$sql->db_Mark_Time('Parse Admin Header');
|
||||||
if (strpos(e_SELF.'?'.e_QUERY, 'menus.php?configure') === FALSE) {
|
if (strpos(e_SELF.'?'.e_QUERY, 'menus.php?configure') === FALSE) {
|
||||||
|
Reference in New Issue
Block a user