X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Ftemplate%2Fclass_BaseTemplateEngine.php;h=6b8145f46c629e939e4f9956b9ffa08d0e5998cf;hp=4948b28f7890ba1723f05a36649e5a82706ad1c8;hb=57bbfb3dec01126b0e4e0b2cdebaca155880cc54;hpb=7aae7aa8325f660cbe1e238f3062550a0c2ba5bf diff --git a/inc/classes/main/template/class_BaseTemplateEngine.php b/inc/classes/main/template/class_BaseTemplateEngine.php index 4948b28f..6b8145f4 100644 --- a/inc/classes/main/template/class_BaseTemplateEngine.php +++ b/inc/classes/main/template/class_BaseTemplateEngine.php @@ -724,7 +724,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { // Is language support enabled? if ($this->isLanguageSupportEnabled()) { // Construct the FQFN for the template by honoring the current language - $fqfn = sprintf("%s%s%s%s/%s/%s%s", + $fqfn = sprintf('%s%s%s%s/%s/%s%s', $this->getConfigInstance()->getConfigEntry('base_path'), $this->getTemplateBasePath(), $this->getGenericBasePath(), @@ -735,7 +735,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { ); } else { // Construct the FQFN for the template without language - $fqfn = sprintf("%s%s%s%s/%s%s", + $fqfn = sprintf('%s%s%s%s/%s%s', $this->getConfigInstance()->getConfigEntry('base_path'), $this->getTemplateBasePath(), $this->getGenericBasePath(), @@ -1256,7 +1256,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { $this->finalizeVariableCompilation(); // Prepare the eval() command for comiling the template - $eval = sprintf("\$result = \"%s\";", + $eval = sprintf('$result = "%s";', addslashes($this->getRawTemplateData()) ); @@ -1276,14 +1276,14 @@ class BaseTemplateEngine extends BaseFrameworkSystem { $evalRight = substr($evalRight, (strpos($evalRight, $this->codeEnd) + 2)); // And put all together - $eval = sprintf("%s<%%php %s %%>%s", $evalLeft, $evalMiddle, $evalRight); + $eval = sprintf('%s<%%php %s %%>%s', $evalLeft, $evalMiddle, $evalRight); } // END - while // Prepare PHP code for eval() command $eval = str_replace( - "<%php", "\";", + '<%php', '";', str_replace( - "%>", + '%>', "\n\$result .= \"", $eval ) @@ -1295,7 +1295,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { // Goes something wrong? if ((!isset($result)) || (empty($result))) { // Output eval command - self::createDebugInstance(__CLASS__)->debugOutput(sprintf("Failed eval() code:
%s
", $this->markupCode($eval, TRUE)), TRUE); + self::createDebugInstance(__CLASS__)->debugOutput(sprintf('Failed eval() code:
%s
', $this->markupCode($eval, TRUE)), TRUE); // Output backtrace here $this->debugBackTrace();