From: Roland Häder Date: Thu, 17 Jun 2010 00:37:15 +0000 (+0000) Subject: More relaxed check (only first X characters) X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=7654cbfe7df1e422c468bc78c967678b0478da19 More relaxed check (only first X characters) --- diff --git a/inc/classes/main/template/class_BaseTemplateEngine.php b/inc/classes/main/template/class_BaseTemplateEngine.php index c1aa4f8f..e719ebb7 100644 --- a/inc/classes/main/template/class_BaseTemplateEngine.php +++ b/inc/classes/main/template/class_BaseTemplateEngine.php @@ -1245,8 +1245,11 @@ class BaseTemplateEngine extends BaseFrameworkSystem { * count has been found */ public function compileTemplate () { + // Get code type to make things shorter + $codeType = $this->getConfigInstance()->getConfigEntry('code_template_type'); + // We will only work with template type "code" from configuration - if ($this->getTemplateType() != $this->getConfigInstance()->getConfigEntry('code_template_type')) { + if (substr($this->getTemplateType(), 0, strlen($codeType)) != $codeType) { // Abort here throw new UnexpectedTemplateTypeException(array($this, $this->getTemplateType(), $this->getConfigInstance()->getConfigEntry('code_template_type')), self::EXCEPTION_TEMPLATE_TYPE_IS_UNEXPECTED); } // END - if