From 439d41b194073285ab97be94253b3f4cb4395e43 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 18 Dec 2017 15:48:49 +0100 Subject: install smarty via composer and update other php libs --- .../smarty_internal_runtime_getincludepath.php | 180 --------------------- 1 file changed, 180 deletions(-) delete mode 100644 library/Smarty/libs/sysplugins/smarty_internal_runtime_getincludepath.php (limited to 'library/Smarty/libs/sysplugins/smarty_internal_runtime_getincludepath.php') diff --git a/library/Smarty/libs/sysplugins/smarty_internal_runtime_getincludepath.php b/library/Smarty/libs/sysplugins/smarty_internal_runtime_getincludepath.php deleted file mode 100644 index 72149cd35..000000000 --- a/library/Smarty/libs/sysplugins/smarty_internal_runtime_getincludepath.php +++ /dev/null @@ -1,180 +0,0 @@ -_include_path != $_i_path) { - $this->_include_dirs = array(); - $this->_include_path = $_i_path; - $_dirs = (array) explode(PATH_SEPARATOR, $_i_path); - foreach ($_dirs as $_path) { - if (is_dir($_path)) { - $this->_include_dirs[] = $smarty->_realpath($_path . DS, true); - } - } - return true; - } - return false; - } - - /** - * return array with include path directories - * - * @param \Smarty $smarty - * - * @return array - */ - public function getIncludePathDirs(Smarty $smarty) - { - $this->isNewIncludePath($smarty); - return $this->_include_dirs; - } - - /** - * Return full file path from PHP include_path - * - * @param string[] $dirs - * @param string $file - * @param \Smarty $smarty - * - * @return bool|string full filepath or false - * - */ - public function getIncludePath($dirs, $file, Smarty $smarty) - { - //if (!(isset($this->_has_stream_include) ? $this->_has_stream_include : $this->_has_stream_include = false)) { - if (!(isset($this->_has_stream_include) ? $this->_has_stream_include : $this->_has_stream_include = function_exists('stream_resolve_include_path'))) { - $this->isNewIncludePath($smarty); - } - // try PHP include_path - foreach ($dirs as $dir) { - $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]; - } else { - continue; - } - } - if (isset($this->_user_dirs[$dir_n])) { - if (false === $this->_user_dirs[$dir_n]) { - continue; - } else { - $dir = $this->_user_dirs[$dir_n]; - } - } else { - if ($dir[0] == '/' || $dir[1] == ':') { - $dir = str_ireplace(getcwd(), '.', $dir); - if ($dir[0] == '/' || $dir[1] == ':') { - $this->_user_dirs[$dir_n] = false; - continue; - } - } - $dir = substr($dir, 2); - $this->_user_dirs[$dir_n] = $dir; - } - if ($this->_has_stream_include) { - $path = stream_resolve_include_path($dir . (isset($file) ? $file : '')); - if ($path) { - return $this->isFile[$dir_n][$file] = $path; - } - } else { - foreach ($this->_include_dirs as $key => $_i_path) { - $path = isset($this->isPath[$key][$dir_n]) ? $this->isPath[$key][$dir_n] : $this->isPath[$key][$dir_n] = is_dir($_dir_path = $_i_path . - $dir) ? $_dir_path : false; - if ($path === false) { - continue; - } - if (isset($file)) { - $_file = $this->isFile[$dir_n][$file] = (is_file($path . $file)) ? $path . $file : false; - if ($_file) { - return $_file; - } - } else { - // no file was given return directory path - return $path; - } - } - } - } - return false; - } -} -- cgit v1.2.3