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)
|
function _autoloader($class)
|
||||||
{
|
{
|
||||||
if (strpos($class, '_') !== false) {
|
if (strpos($class, '_') !== false) {
|
||||||
$class = str_replace('_', '/', $class);
|
$class = str_replace('_', DIRECTORY_SEPARATOR, $class);
|
||||||
if (file_exists('autoload/' . $class . '.php')) {
|
if (file_exists('autoload' . DIRECTORY_SEPARATOR . $class . '.php')) {
|
||||||
include 'autoload/' . $class . '.php';
|
include 'autoload' . DIRECTORY_SEPARATOR . $class . '.php';
|
||||||
} else {
|
} else {
|
||||||
$class = str_replace("\\", "/", $class);
|
$class = str_replace("\\", DIRECTORY_SEPARATOR, $class);
|
||||||
if (file_exists(__DIR__ . '/autoload/' . $class . '.php'))
|
if (file_exists(__DIR__ . DIRECTORY_SEPARATOR . 'autoload' . DIRECTORY_SEPARATOR . $class . '.php'))
|
||||||
include __DIR__ . '/autoload/' . $class . '.php';
|
include __DIR__ . DIRECTORY_SEPARATOR . 'autoload' . DIRECTORY_SEPARATOR . $class . '.php';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (file_exists('autoload/' . $class . '.php')) {
|
if (file_exists('autoload' . DIRECTORY_SEPARATOR . $class . '.php')) {
|
||||||
include 'autoload/' . $class . '.php';
|
include 'autoload' . DIRECTORY_SEPARATOR . $class . '.php';
|
||||||
} else {
|
} else {
|
||||||
$class = str_replace("\\", "/", $class);
|
$class = str_replace("\\", DIRECTORY_SEPARATOR, $class);
|
||||||
if (file_exists(__DIR__ . '/autoload/' . $class . '.php'))
|
if (file_exists(__DIR__ . DIRECTORY_SEPARATOR . 'autoload' . DIRECTORY_SEPARATOR . $class . '.php'))
|
||||||
include __DIR__ . '/autoload/' . $class . '.php';
|
include __DIR__ . DIRECTORY_SEPARATOR . 'autoload' . DIRECTORY_SEPARATOR . $class . '.php';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -177,7 +177,8 @@ function _log($description, $type = '', $userid = '0')
|
|||||||
$d->save();
|
$d->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
function Lang($key){
|
function Lang($key)
|
||||||
|
{
|
||||||
global $_L, $lan_file;
|
global $_L, $lan_file;
|
||||||
if (!empty($_L[$key])) {
|
if (!empty($_L[$key])) {
|
||||||
return $_L[$key];
|
return $_L[$key];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user