diff options
Diffstat (limited to 'vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_getincludepath.php')
-rw-r--r-- | vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_getincludepath.php | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_getincludepath.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_getincludepath.php index e12b0c57c..54b1bb3d5 100644 --- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_getincludepath.php +++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_getincludepath.php @@ -21,49 +21,42 @@ class Smarty_Internal_Runtime_GetIncludePath * @var string */ public $_include_path = ''; - /** * include path directory cache * * @var array */ public $_include_dirs = array(); - /** * include path directory cache * * @var array */ public $_user_dirs = array(); - /** * stream cache * - * @var string[] + * @var string[][] */ public $isFile = array(); - /** * stream cache * * @var string[] */ public $isPath = array(); - /** * stream cache * * @var int[] */ public $number = array(); - /** * status cache * * @var bool */ public $_has_stream_include = null; - /** * Number for array index * @@ -81,13 +74,13 @@ class Smarty_Internal_Runtime_GetIncludePath public function isNewIncludePath(Smarty $smarty) { $_i_path = get_include_path(); - if ($this->_include_path != $_i_path) { + if ($this->_include_path !== $_i_path) { $this->_include_dirs = array(); $this->_include_path = $_i_path; - $_dirs = (array) explode(PATH_SEPARATOR, $_i_path); + $_dirs = (array)explode(PATH_SEPARATOR, $_i_path); foreach ($_dirs as $_path) { if (is_dir($_path)) { - $this->_include_dirs[] = $smarty->_realpath($_path . $smarty->ds, true); + $this->_include_dirs[] = $smarty->_realpath($_path . DIRECTORY_SEPARATOR, true); } } return true; @@ -128,7 +121,7 @@ class Smarty_Internal_Runtime_GetIncludePath } // try PHP include_path foreach ($dirs as $dir) { - $dir_n = isset($this->number[ $dir ]) ? $this->number[ $dir ] : $this->number[ $dir ] = $this->counter ++; + $dir_n = isset($this->number[ $dir ]) ? $this->number[ $dir ] : $this->number[ $dir ] = $this->counter++; if (isset($this->isFile[ $dir_n ][ $file ])) { if ($this->isFile[ $dir_n ][ $file ]) { return $this->isFile[ $dir_n ][ $file ]; @@ -143,9 +136,9 @@ class Smarty_Internal_Runtime_GetIncludePath $dir = $this->_user_dirs[ $dir_n ]; } } else { - if ($dir[ 0 ] == '/' || $dir[ 1 ] == ':') { + if ($dir[ 0 ] === '/' || $dir[ 1 ] === ':') { $dir = str_ireplace(getcwd(), '.', $dir); - if ($dir[ 0 ] == '/' || $dir[ 1 ] == ':') { + if ($dir[ 0 ] === '/' || $dir[ 1 ] === ':') { $this->_user_dirs[ $dir_n ] = false; continue; } |