summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--itjs.class4
1 files changed, 2 insertions, 2 deletions
diff --git a/itjs.class b/itjs.class
index 614926d..c81880a 100644
--- a/itjs.class
+++ b/itjs.class
@@ -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();