diff options
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(); |