Improved path resolving
This commit is contained in:
parent
b17847698e
commit
22483c86ea
|
@ -17,7 +17,7 @@ class Locale {
|
|||
}
|
||||
|
||||
private function load_lang(string $lang) {
|
||||
$path = "../lang/" . basename("$lang.json");
|
||||
$path = dirname(__DIR__) . "/lang/" . basename("$lang.json");
|
||||
if (is_file($path)) {
|
||||
$content = file_get_contents($path);
|
||||
if (!$content) return;
|
||||
|
|
|
@ -28,7 +28,7 @@ class Status {
|
|||
$twig_config = [];
|
||||
if (Config::get("enable_twig_cache")) $twig_config["cache"] = "../cache/twig/";
|
||||
|
||||
$loader = new \Twig\Loader\FilesystemLoader("../view/");
|
||||
$loader = new \Twig\Loader\FilesystemLoader(dirname(__DIR__) . "/view/");
|
||||
$twig = new \Twig\Environment($loader, $twig_config);
|
||||
|
||||
$twig->addFilter(Filters::globalstatus());
|
||||
|
|
Loading…
Reference in a new issue