$mtime = array(0);
$s_list = $hsf->listFiles();
+ if (empty($s_list)) {
+ return;
+ }
+
+ /* Output prototype.js separately from the other files. */
+ $js_force[] = $s_list['horde'][0]['u'];
+ unset($s_list['horde'][0]);
+
foreach ($s_list as $app => $files) {
foreach ($files as $file) {
if ($file['d'] && ($file['f'][0] != '/') && empty($file['e'])) {
}
sort($s_list);
-
$sig = hash('md5', serialize($s_list) . max($mtime));
switch ($cache_type) {
if (!$exists) {
$out = '';
foreach ($js_tocache as $key => $val) {
- // Seperate JS files with a newline since some compressors may
+ // Separate JS files with a newline since some compressors may
// strip trailing terminators.
if ($val) {
// Minify these files a bit by removing newlines and
}
}
- foreach (array_merge($js_external, array($js_url), $js_force) as $val) {
- echo '<script type="text/javascript" src="' . $val . "\"></script>\n";
+ foreach (array_merge($js_force, array($js_url), $js_external) as $val) {
+ $hsf->outputTag($val);
}
}