fix separator with DIRECTORY_SEPARATOR
This commit is contained in:
parent
0b02b070d3
commit
b943a73cb4
@ -121,21 +121,21 @@ if (isset($_SESSION['notify'])) {
|
||||
function _autoloader($class)
|
||||
{
|
||||
if (strpos($class, '_') !== false) {
|
||||
$class = str_replace('_', '/', $class);
|
||||
if (file_exists('autoload/' . $class . '.php')) {
|
||||
include 'autoload/' . $class . '.php';
|
||||
$class = str_replace('_', DIRECTORY_SEPARATOR, $class);
|
||||
if (file_exists('autoload' . DIRECTORY_SEPARATOR . $class . '.php')) {
|
||||
include 'autoload' . DIRECTORY_SEPARATOR . $class . '.php';
|
||||
} else {
|
||||
$class = str_replace("\\", "/", $class);
|
||||
if (file_exists(__DIR__ . '/autoload/' . $class . '.php'))
|
||||
include __DIR__ . '/autoload/' . $class . '.php';
|
||||
$class = str_replace("\\", DIRECTORY_SEPARATOR, $class);
|
||||
if (file_exists(__DIR__ . DIRECTORY_SEPARATOR . 'autoload' . DIRECTORY_SEPARATOR . $class . '.php'))
|
||||
include __DIR__ . DIRECTORY_SEPARATOR . 'autoload' . DIRECTORY_SEPARATOR . $class . '.php';
|
||||
}
|
||||
} else {
|
||||
if (file_exists('autoload/' . $class . '.php')) {
|
||||
include 'autoload/' . $class . '.php';
|
||||
if (file_exists('autoload' . DIRECTORY_SEPARATOR . $class . '.php')) {
|
||||
include 'autoload' . DIRECTORY_SEPARATOR . $class . '.php';
|
||||
} else {
|
||||
$class = str_replace("\\", "/", $class);
|
||||
if (file_exists(__DIR__ . '/autoload/' . $class . '.php'))
|
||||
include __DIR__ . '/autoload/' . $class . '.php';
|
||||
$class = str_replace("\\", DIRECTORY_SEPARATOR, $class);
|
||||
if (file_exists(__DIR__ . DIRECTORY_SEPARATOR . 'autoload' . DIRECTORY_SEPARATOR . $class . '.php'))
|
||||
include __DIR__ . DIRECTORY_SEPARATOR . 'autoload' . DIRECTORY_SEPARATOR . $class . '.php';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -177,7 +177,8 @@ function _log($description, $type = '', $userid = '0')
|
||||
$d->save();
|
||||
}
|
||||
|
||||
function Lang($key){
|
||||
function Lang($key)
|
||||
{
|
||||
global $_L, $lan_file;
|
||||
if (!empty($_L[$key])) {
|
||||
return $_L[$key];
|
||||
|
Loading…
x
Reference in New Issue
Block a user