summaryrefslogtreecommitdiff
path: root/libs/sysplugins/smarty_internal_runtime_getincludepath.php
diff options
context:
space:
mode:
authoruwetews <uwe.tews@googlemail.com>2016-02-09 01:27:15 +0100
committeruwetews <uwe.tews@googlemail.com>2016-02-09 01:27:15 +0100
commitb04486a091558a2b1280e3ee7fb90758e9a32230 (patch)
treeddb15a12dba78e6873a348acd25f872429e210d2 /libs/sysplugins/smarty_internal_runtime_getincludepath.php
parentc59ca44b9ff62a7f54e30409514834a8529780ca (diff)
downloadsmarty-b04486a091558a2b1280e3ee7fb90758e9a32230.tar.gz
smarty-b04486a091558a2b1280e3ee7fb90758e9a32230.tar.bz2
smarty-b04486a091558a2b1280e3ee7fb90758e9a32230.zip
- reformat all code for unique style
Diffstat (limited to 'libs/sysplugins/smarty_internal_runtime_getincludepath.php')
-rw-r--r--libs/sysplugins/smarty_internal_runtime_getincludepath.php36
1 files changed, 19 insertions, 17 deletions
diff --git a/libs/sysplugins/smarty_internal_runtime_getincludepath.php b/libs/sysplugins/smarty_internal_runtime_getincludepath.php
index 72149cd3..9eae1822 100644
--- a/libs/sysplugins/smarty_internal_runtime_getincludepath.php
+++ b/libs/sysplugins/smarty_internal_runtime_getincludepath.php
@@ -121,50 +121,52 @@ class Smarty_Internal_Runtime_GetIncludePath
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);
+ 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];
+ $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]) {
+ if (isset($this->_user_dirs[ $dir_n ])) {
+ if (false === $this->_user_dirs[ $dir_n ]) {
continue;
} else {
- $dir = $this->_user_dirs[$dir_n];
+ $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] == ':') {
- $this->_user_dirs[$dir_n] = false;
+ if ($dir[ 0 ] == '/' || $dir[ 1 ] == ':') {
+ $this->_user_dirs[ $dir_n ] = false;
continue;
}
}
$dir = substr($dir, 2);
- $this->_user_dirs[$dir_n] = $dir;
+ $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;
+ 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;
+ $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;
+ $_file = $this->isFile[ $dir_n ][ $file ] = (is_file($path . $file)) ? $path . $file : false;
if ($_file) {
return $_file;
}