summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Weber2007-01-22 14:25:40 +0000
committerChristian Weber2007-01-22 14:25:40 +0000
commit116ef3ed0e7a5f02cbda5578c4edb4630b9a5bea (patch)
tree7891558f2375e90b5303ab249d6f2d2505884a00
parent84b58ac0ab95629fb0c08aa31cb707d795e94ad3 (diff)
downloaditools-116ef3ed0e7a5f02cbda5578c4edb4630b9a5bea.tar.gz
itools-116ef3ed0e7a5f02cbda5578c4edb4630b9a5bea.tar.bz2
itools-116ef3ed0e7a5f02cbda5578c4edb4630b9a5bea.zip
Fixed _itjs() in concatenation mode
-rw-r--r--html.class12
1 files changed, 5 insertions, 7 deletions
diff --git a/html.class b/html.class
index eb3e174..d44f994 100644
--- a/html.class
+++ b/html.class
@@ -357,26 +357,24 @@ function _itjs($files, $mode)
if ($files)
{
+ $filenames = itjs::filenames($files);
+
if ($mode == "files")
{
- foreach (itjs::filenames($files) as $file)
+ foreach ($filenames as $file)
$result .= tag('script', array('type' => "text/javascript", 'src' => "/itjs/" . basename($file) . "?v=" . itjs::checksum($file)));
}
else if ($mode == "inline")
{
$jsfile = "";
- foreach (itjs::filenames($files) as $file)
+ foreach ($filenames as $file)
$jsfile .= @file_get_contents($file);
$result .= itjs::strip($jsfile);
}
else
- {
- $filenames = itjs::filenames($files);
-
- $result .= tag('script', array('type' => "text/javascript", 'src' => "/itjs/" . join(",", $files) . "?v=" . itjs::checksum($filenames)));
- }
+ $result .= tag('script', array('type' => "text/javascript", 'src' => "/itjs/$files?v=" . itjs::checksum($filenames)));
}
return $result;