diff options
author | Thomas Willingham <beardyunixer@beardyunixer.com> | 2014-12-11 20:15:27 +0000 |
---|---|---|
committer | Thomas Willingham <beardyunixer@beardyunixer.com> | 2014-12-11 20:15:27 +0000 |
commit | 967ab871b836f618107fe144978bd1453c3c6634 (patch) | |
tree | 1bcb1b4bb1b25c904a2bc06f5c6d526d29909eaa /library/Smarty/libs/sysplugins/smarty_internal_get_include_path.php | |
parent | 960c35bad3a0dbaa7a1f2191aef60ad014d926ca (diff) | |
download | volse-hubzilla-967ab871b836f618107fe144978bd1453c3c6634.tar.gz volse-hubzilla-967ab871b836f618107fe144978bd1453c3c6634.tar.bz2 volse-hubzilla-967ab871b836f618107fe144978bd1453c3c6634.zip |
Update Smarty
Diffstat (limited to 'library/Smarty/libs/sysplugins/smarty_internal_get_include_path.php')
-rw-r--r-- | library/Smarty/libs/sysplugins/smarty_internal_get_include_path.php | 94 |
1 files changed, 46 insertions, 48 deletions
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_get_include_path.php b/library/Smarty/libs/sysplugins/smarty_internal_get_include_path.php index 518c406aa..d46ca7029 100644 --- a/library/Smarty/libs/sysplugins/smarty_internal_get_include_path.php +++ b/library/Smarty/libs/sysplugins/smarty_internal_get_include_path.php @@ -1,48 +1,46 @@ -<?php
-/**
- * Smarty read include path plugin
- *
- * @package Smarty
- * @subpackage PluginsInternal
- * @author Monte Ohrt
- */
-
-/**
- * Smarty Internal Read Include Path Class
- *
- * @package Smarty
- * @subpackage PluginsInternal
- */
-class Smarty_Internal_Get_Include_Path {
-
- /**
- * Return full file path from PHP include_path
- *
- * @param string $filepath filepath
- * @return string|boolean full filepath or false
- */
- public static function getIncludePath($filepath)
- {
- static $_include_path = null;
-
- if (function_exists('stream_resolve_include_path')) {
- // available since PHP 5.3.2
- return stream_resolve_include_path($filepath);
- }
-
- if ($_include_path === null) {
- $_include_path = explode(PATH_SEPARATOR, get_include_path());
- }
-
- foreach ($_include_path as $_path) {
- if (file_exists($_path . DS . $filepath)) {
- return $_path . DS . $filepath;
- }
- }
-
- return false;
- }
-
-}
-
-?>
\ No newline at end of file +<?php +/** + * Smarty read include path plugin + * + * @package Smarty + * @subpackage PluginsInternal + * @author Monte Ohrt + */ + +/** + * Smarty Internal Read Include Path Class + * + * @package Smarty + * @subpackage PluginsInternal + */ +class Smarty_Internal_Get_Include_Path +{ + /** + * Return full file path from PHP include_path + * + * @param string $filepath filepath + * + * @return string|boolean full filepath or false + */ + public static function getIncludePath($filepath) + { + static $_include_path = null; + + if (function_exists('stream_resolve_include_path')) { + // available since PHP 5.3.2 + return stream_resolve_include_path($filepath); + } + + if ($_include_path === null) { + $_include_path = explode(PATH_SEPARATOR, get_include_path()); + } + + foreach ($_include_path as $_path) { + if (file_exists($_path . DS . $filepath)) { + return $_path . DS . $filepath; + } + } + + return false; + } +} |