summaryrefslogtreecommitdiff
path: root/html.class
diff options
context:
space:
mode:
Diffstat (limited to 'html.class')
-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;