mirror of
https://github.com/Aviortheking/DeltaCMS.git
synced 2025-06-07 07:19:55 +00:00
Fixed Cache folder not made in the correct place
This commit is contained in:
parent
e5ae2db418
commit
be5ed19c13
@ -37,6 +37,7 @@ class DeltaCMS
|
|||||||
$ap = self::$instance = new self();
|
$ap = self::$instance = new self();
|
||||||
$ap->root = dirname(__DIR__);
|
$ap->root = dirname(__DIR__);
|
||||||
$ap->settings = jsonc_decode(dirname($ap->root) . "/config.jsonc", false);
|
$ap->settings = jsonc_decode(dirname($ap->root) . "/config.jsonc", false);
|
||||||
|
$ap->settings->cache->path = dirname($ap->root) . DIRECTORY_SEPARATOR . $ap->settings->cache->path;
|
||||||
$ap->loader = new FilesystemLoader();
|
$ap->loader = new FilesystemLoader();
|
||||||
$ap->addLoaderFolder($ap->root . "/DeltaCMS/Twig");
|
$ap->addLoaderFolder($ap->root . "/DeltaCMS/Twig");
|
||||||
// $ap->setLoader(new FilesystemLoader());
|
// $ap->setLoader(new FilesystemLoader());
|
||||||
@ -64,7 +65,7 @@ class DeltaCMS
|
|||||||
public function getTwig()
|
public function getTwig()
|
||||||
{
|
{
|
||||||
return isset($this->twig) ? $this->twig : $this->twig = new Environment($this->loader, [
|
return isset($this->twig) ? $this->twig : $this->twig = new Environment($this->loader, [
|
||||||
'cache' => $this->isCacheEnabled() ? dirname($this->root) . $this->settings->cache->path . '/twig/' : false
|
'cache' => $this->isCacheEnabled() ? $this->settings->cache->path . '/twig/' : false
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user