group the scripts

This commit is contained in:
Shish 2012-02-12 11:40:36 +00:00
parent 8527da445e
commit 59a17792f5

View file

@ -240,8 +240,6 @@ class Page {
$data_href = get_base_href();
$theme_name = $config->get_string('theme', 'default');
$this->add_html_header("<script type='text/javascript'>base_href = '$data_href';</script>");
if(file_exists("themes/$theme_name/favicon.ico")) {
$this->add_html_header("<link rel='icon' href='$data_href/themes/$theme_name/favicon.ico'>");
$this->add_html_header("<link rel='shortcut icon' href='$data_href/themes/$theme_name/favicon.ico'>");
@ -267,6 +265,8 @@ class Page {
}
}
$this->add_html_header("<script type='text/javascript'>base_href = '$data_href';</script>");
foreach(glob("lib/*.js") as $js) {
$this->add_html_header('<script src="'.$data_href.'/'.$js.'" type="text/javascript"></script>');
}