From 223cdc0787f02262ee4bc9c5ffe71f93ac341d50 Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Sun, 9 Nov 2014 10:15:16 +0100 Subject: [PATCH] moved code into constructor --- libs/Smarty.class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 72349ad9..078986ea 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -683,6 +683,14 @@ class Smarty extends Smarty_Internal_TemplateBase if (isset($_SERVER['SCRIPT_NAME'])) { $this->assignGlobal('SCRIPT_NAME', $_SERVER['SCRIPT_NAME']); } + + // Check if we're running on windows + Smarty::$_IS_WINDOWS = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'; + + // let PCRE (preg_*) treat strings as ISO-8859-1 if we're not dealing with UTF-8 + if (Smarty::$_CHARSET !== 'UTF-8') { + Smarty::$_UTF8_MODIFIER = ''; + } } /** @@ -1586,14 +1594,6 @@ class Smarty extends Smarty_Internal_TemplateBase } } -// Check if we're running on windows -Smarty::$_IS_WINDOWS = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'; - -// let PCRE (preg_*) treat strings as ISO-8859-1 if we're not dealing with UTF-8 -if (Smarty::$_CHARSET !== 'UTF-8') { - Smarty::$_UTF8_MODIFIER = ''; -} - /** * Autoloader