moved favicon and site icon to the templates where they belong
This commit is contained in:
parent
a278041d74
commit
babb8099c9
7 changed files with 38 additions and 29 deletions
|
|
@ -32,6 +32,7 @@
|
|||
- Fixed a user profile vulnerability.
|
||||
- Fixed a sequence ordering problem with the USS.
|
||||
- Added internationalized URL handling.
|
||||
- Moved site icon and fav icon directly into style templates.
|
||||
|
||||
|
||||
6.2.8
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -32,6 +32,24 @@ while (my $data = $sth->hashRef) {
|
|||
$sth->finish;
|
||||
|
||||
|
||||
print "\tMoving site icons into style templates.\n" unless ($quiet);
|
||||
my $type = lc($session{setting}{siteicon});
|
||||
$type =~ s/.*\.(.*?)$/$1/;
|
||||
my $tags = '
|
||||
<link rel="icon" href="'.$session{setting}{siteicon}.'" type="image/'.$type.'" />
|
||||
<link rel="SHORTCUT ICON" href="'.$session{setting}{favicon}.'" />
|
||||
<tmpl_var head.tags>
|
||||
';
|
||||
$sth = WebGUI::SQL->read("select templateId,template from template where namespace='style'");
|
||||
while (my ($id,$template) = $sth->array) {
|
||||
$template =~ s/\<tmpl_var head\.tags\>/$tags/ig;
|
||||
WebGUI::SQL->write("update template set template=".quote($template)." where templateId=".quote($id)." and namespace='style'");
|
||||
}
|
||||
$sth->finish;
|
||||
WebGUI::SQL->write("delete from settings where name in ('siteicon','favicon')");
|
||||
|
||||
|
||||
|
||||
WebGUI::Session::close();
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue