diff options
author | Urban Müller | 2017-08-10 17:17:18 +0200 |
---|---|---|
committer | Urban Müller | 2017-08-10 17:17:18 +0200 |
commit | 948d2e2ac98b63f86de736b693594baff59b3ecc (patch) | |
tree | 9848fded662a8da85dc203c18d4aba3b33585df2 /itjs.class | |
parent | d88f1056eb57779852de8654f292edf50ac44aaf (diff) | |
download | itools-948d2e2ac98b63f86de736b693594baff59b3ecc.tar.gz itools-948d2e2ac98b63f86de736b693594baff59b3ecc.tar.bz2 itools-948d2e2ac98b63f86de736b693594baff59b3ecc.zip |
bugfix: dont try to it_url::get local paths
Diffstat (limited to 'itjs.class')
-rw-r--r-- | itjs.class | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -147,7 +147,7 @@ static function filenames($filelist) } /** - * Return (php-interpreted by default) files that will be sent to client. Files must exist. + * Return content of (php-interpreted by default) TRUSTED filenames that will be sent to client. Files must exist. */ static function filecontents($filenames) { @@ -160,7 +160,7 @@ static function filecontents($filenames) list($filename, $paramstr) = explode("?", $filename); if ($paramstr) parse_str($paramstr, $_GET); - $result .= it::replace(array('^1$' => ""), it::match('\.(js|css|htc)$', $filename) ? include_once($filename) : it_url::get($filename), array('utf8' => false)); + $result .= it::replace(array('^1$' => ""), it::match('\.(js|css|htc)$', $filename) ? include_once($filename) : (file_exists($filename) ? file_get_contents($filename) : it_url::get($filename)), array('utf8' => false)); $_GET = $origget; } $result .= ob_get_clean(); |