From 116ef3ed0e7a5f02cbda5578c4edb4630b9a5bea Mon Sep 17 00:00:00 2001 From: Christian Weber Date: Mon, 22 Jan 2007 14:25:40 +0000 Subject: Fixed _itjs() in concatenation mode --- html.class | 12 +++++------- 1 file 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; -- cgit v1.2.3