mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 19:34:27 +02:00
moved code into constructor
This commit is contained in:
@@ -683,6 +683,14 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
if (isset($_SERVER['SCRIPT_NAME'])) {
|
if (isset($_SERVER['SCRIPT_NAME'])) {
|
||||||
$this->assignGlobal('SCRIPT_NAME', $_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
|
* Autoloader
|
||||||
|
Reference in New Issue
Block a user