From a28d719b16523c554aded04e4136174808184ca1 Mon Sep 17 00:00:00 2001 From: "Bruno O. Notario" Date: Thu, 22 Jul 2021 14:43:11 -0300 Subject: [PATCH] bugfix template loader --- system/engine/controller.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/engine/controller.php b/system/engine/controller.php index 4eccd70..e7d85f8 100644 --- a/system/engine/controller.php +++ b/system/engine/controller.php @@ -195,7 +195,7 @@ abstract class Controller { $structure[] = 'default/'.$pegRout[0].'/'.$pegRout[1].((isset($pegRout[2])) ? '_'.$pegRout[2] : '').'.'.$extensionTemplate; $structure[] = $pegRout[0].'/'.$pegRout[1].((isset($pegRout[2])) ? '_'.$pegRout[2] : '').'.'.$extensionTemplate; $structure[] = implode("/", $pegRoutWithoutLast).'/View/'.end($pegRout).'.'.$extensionTemplate; - $structure[] = implode("/", $pegRoutWithoutPenultimate).'/View/'.end($pegRout).((isset($pegRout[count($pegRout)-2])) ? "_".$pegRout[count($pegRout)-2] : "").'.'.$extensionTemplate; + $structure[] = implode("/", $pegRoutWithoutPenultimate).'/View/'.((isset($pegRout[count($pegRout)-2])) ? $pegRout[count($pegRout)-2]."_".end($pegRout) : end($pegRout)).'.'.$extensionTemplate; foreach($structure as $themefile){ @@ -265,8 +265,8 @@ abstract class Controller { ); $TwigLoaderFilesystem = constant('\TwigLoaderFilesystem'); $Twig_Environment = constant('\TwigEnvironment'); - $Twig_SimpleFilter = constant('TwigSimpleFilter'); - $Twig_Extension_Debug = constant('TwigExtensionDebug'); + $Twig_SimpleFilter = constant('\TwigSimpleFilter'); + $Twig_Extension_Debug = constant('\TwigExtensionDebug'); /** * @var \TwigLoaderFilesystem