summaryrefslogtreecommitdiff
path: root/itjs.class
diff options
context:
space:
mode:
authorUrban Müller2014-10-06 15:47:45 +0200
committerUrban Müller2014-10-06 15:47:45 +0200
commitaa4b89767df4a0753f1a3b62e04a4817bb199fef (patch)
tree429ce168b3fbc8f3ec00b842db8072751bdbd0d7 /itjs.class
parent61f52c04e6185d08a968b80e4d36fa0b8677cfb0 (diff)
downloaditools-aa4b89767df4a0753f1a3b62e04a4817bb199fef.tar.gz
itools-aa4b89767df4a0753f1a3b62e04a4817bb199fef.tar.bz2
itools-aa4b89767df4a0753f1a3b62e04a4817bb199fef.zip
accept GET params in join script files, accept script list in param f
Diffstat (limited to 'itjs.class')
-rw-r--r--itjs.class11
1 files changed, 9 insertions, 2 deletions
diff --git a/itjs.class b/itjs.class
index 1a8f4a0..5277472 100644
--- a/itjs.class
+++ b/itjs.class
@@ -134,9 +134,9 @@ static function filenames($filelist)
"PIE.htc" => "$libsearch/doc/PIE.htc",
);
- foreach (array_filter(explode(",", it::replace(array('\?.*' => ""), basename($filelist)))) as $file)
+ foreach (array_filter(explode(",", basename($filelist))) as $file)
{
- $filenames = $special[$file] ? $special[$file] : "$path/$file";
+ $filenames = $special[$file] ?: (file_exists("$path/" . it::replace(array('\?.*' => ""), $file)) ? "$path/$file" : "$libsearch/itjs/$file");
foreach (explode(",", $filenames) as $filename)
if (!$seen[$filename]++)
@@ -155,7 +155,14 @@ static function filecontents($filenames, $execphp = true)
{
ob_start(); # Needs to capture inside loop to guarantee file order
if (!(it::match('W3C_CSS_Validator', $_SERVER['HTTP_USER_AGENT']) && it::match('jquery-ui\.css', $filename)))
+ {
+ $origget = $_GET;
+ list($filename, $paramstr) = explode("?", $filename);
+ if ($paramstr && $execphp)
+ parse_str($paramstr, $_GET);
$result .= it::replace(array('^1$' => ""), $execphp ? @include($filename) : @file_get_contents($filename), array('utf8' => false));
+ $_GET = $origget;
+ }
$result .= ob_get_clean();
}