bugfix: Untill user visit status page theme is not set.

Move default theme selection to html_header() to solve theme not being set.
This commit is contained in:
Conrad Lara - KG6JEI 2015-05-14 11:36:51 -07:00
parent d59709d840
commit 42ee986cd3
2 changed files with 5 additions and 4 deletions

View File

@ -61,6 +61,11 @@ sub html_header
print "<meta http-equiv='expires' content='0'>\n";
print "<meta http-equiv='cache-control' content='no-cache'>\n";
print "<meta http-equiv='pragma' content='no-cache'>\n";
# set up the style sheet
mkdir "/tmp/web" unless -d "/tmp/web"; # make sure /tmp/web exists
symlink "/www/aredn.css","/tmp/web/style.css" unless -l "/tmp/web/style.css"; # default to aredn.css
# Prevent browser caching of the css file
my $rnum=`date +%s`;
chomp($rnum);

View File

@ -48,10 +48,6 @@ $config = "not set" if $config eq "" or not -d "/etc/config.$config";
read_postdata();
# set up the style sheet
mkdir "/tmp/web" unless -d "/tmp/web"; # make sure /tmp/web exists
symlink "/www/aredn.css","/tmp/web/style.css" unless -l "/tmp/web/style.css"; # default to aredn.css
if($parms{css} and -f "/www/$parms{css}" and $parms{css} =~ /\.css$/i) {
unlink "/tmp/web/style.css";
symlink "/www/$parms{css}","/tmp/web/style.css";