Hello,
Can we not avoid loading %mainsettings in many of the CGI scripts?
-Michael
On 8 Apr 2021, at 09:36, Jonatan Schlag jonatan.schlag@ipfire.org wrote:
This disables the theme support and makes it impossible to use any other themes than the ipfire default theme.
The only intention of this patch is to hardcode the theme to ipfire. To change any cgi we have is an ugly way, but the only way to do this fast. The colour handling needs certainly to be improved as well, but this will and should be done in other patches.
Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org
config/cfgroot/graphs.pl | 4 +- config/cfgroot/header.pl | 3 +- html/cgi-bin/atm-status.cgi | 2 +- html/cgi-bin/backup.cgi | 2 +- html/cgi-bin/captive.cgi | 2 +- html/cgi-bin/connscheduler.cgi | 2 +- html/cgi-bin/ddns.cgi | 2 +- html/cgi-bin/dhcp.cgi | 2 +- html/cgi-bin/dns.cgi | 2 +- html/cgi-bin/dnsforward.cgi | 2 +- html/cgi-bin/firewall.cgi | 2 +- html/cgi-bin/fwhosts.cgi | 2 +- html/cgi-bin/guardian.cgi | 2 +- html/cgi-bin/gui.cgi | 45 -------------------- html/cgi-bin/hardwaregraphs.cgi | 2 +- html/cgi-bin/hosts.cgi | 2 +- html/cgi-bin/ids.cgi | 2 +- html/cgi-bin/index.cgi | 2 +- html/cgi-bin/ipinfo.cgi | 2 +- html/cgi-bin/location-block.cgi | 2 +- html/cgi-bin/logs.cgi/firewalllog.dat | 2 +- html/cgi-bin/logs.cgi/firewalllogcountry.dat | 2 +- html/cgi-bin/logs.cgi/firewalllogip.dat | 2 +- html/cgi-bin/logs.cgi/firewalllogport.dat | 2 +- html/cgi-bin/logs.cgi/ids.dat | 2 +- html/cgi-bin/logs.cgi/log.dat | 2 +- html/cgi-bin/logs.cgi/ovpnclients.dat | 2 +- html/cgi-bin/logs.cgi/proxylog.dat | 2 +- html/cgi-bin/logs.cgi/urlfilter.dat | 2 +- html/cgi-bin/mail.cgi | 2 +- html/cgi-bin/mdstat.cgi | 2 +- html/cgi-bin/media.cgi | 2 +- html/cgi-bin/memory.cgi | 2 +- html/cgi-bin/mpfire.cgi | 2 +- html/cgi-bin/netexternal.cgi | 2 +- html/cgi-bin/netinternal.cgi | 2 +- html/cgi-bin/netother.cgi | 2 +- html/cgi-bin/netovpnrw.cgi | 2 +- html/cgi-bin/netovpnsrv.cgi | 2 +- html/cgi-bin/ovpnmain.cgi | 2 +- html/cgi-bin/p2p-block.cgi | 2 +- html/cgi-bin/pakfire.cgi | 2 +- html/cgi-bin/pppsetup.cgi | 2 +- html/cgi-bin/proxy.cgi | 2 +- html/cgi-bin/qos.cgi | 2 +- html/cgi-bin/remote.cgi | 2 +- html/cgi-bin/routing.cgi | 2 +- html/cgi-bin/samba.cgi | 2 +- html/cgi-bin/services.cgi | 2 +- html/cgi-bin/system.cgi | 2 +- html/cgi-bin/tor.cgi | 2 +- html/cgi-bin/traffic.cgi | 2 +- html/cgi-bin/updatexlrator.cgi | 2 +- html/cgi-bin/vpnmain.cgi | 2 +- html/cgi-bin/vulnerabilities.cgi | 2 +- html/cgi-bin/wakeonlan.cgi | 2 +- html/cgi-bin/wirelessclient.cgi | 2 +- html/cgi-bin/wlanap.cgi | 2 +- html/html/themes/ipfire/include/functions.pl | 10 ++--- src/scripts/makegraphs | 2 +- src/squid-accounting/accounting.cgi | 2 +- src/wio/wio-graphs.pl | 2 +- src/wio/wio.cgi | 2 +- 63 files changed, 64 insertions(+), 116 deletions(-)
diff --git a/config/cfgroot/graphs.pl b/config/cfgroot/graphs.pl index cf4a30de3..441d4c483 100644 --- a/config/cfgroot/graphs.pl +++ b/config/cfgroot/graphs.pl @@ -62,14 +62,12 @@ my @GRAPH_ARGS = ( "--alt-y-grid", );
-# Read the global settings files to get the current theme and after this load -# colors for this theme
my %color = (); my %mainsettings = (); my %sensorsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
if ( $mainsettings{'RRDLOG'} eq "" ){ $mainsettings{'RRDLOG'}="/var/log/rrd"; diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index 8dea804d0..83ef01951 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -91,11 +91,10 @@ if ( -d "/var/ipfire/langs/${language}/" ) { }; };
-our $THEME_NAME = $settings{'THEME'};
require "${swroot}/langs/en.pl"; require "${swroot}/langs/${language}.pl"; -eval `/bin/cat /srv/web/ipfire/html/themes/$THEME_NAME/include/functions.pl`; +eval `/bin/cat /srv/web/ipfire/html/themes/ipfire/include/functions.pl`;
sub green_used() { if ($ethsettings{'GREEN_DEV'} && $ethsettings{'GREEN_DEV'} ne "") { diff --git a/html/cgi-bin/atm-status.cgi b/html/cgi-bin/atm-status.cgi index c2a9914f7..49f19209d 100644 --- a/html/cgi-bin/atm-status.cgi +++ b/html/cgi-bin/atm-status.cgi @@ -33,7 +33,7 @@ my %color = (); my %mainsettings = ();
&General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
&Header::showhttpheaders(); &Header::openpage($Lang::tr{'status information'}, 1, ''); diff --git a/html/cgi-bin/backup.cgi b/html/cgi-bin/backup.cgi index cac4146ab..683f8add4 100644 --- a/html/cgi-bin/backup.cgi +++ b/html/cgi-bin/backup.cgi @@ -42,7 +42,7 @@ my @backupisos = ""; $a = new CGI;
&General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
$cgiparams{'ACTION'} = ''; $cgiparams{'FILE'} = ''; diff --git a/html/cgi-bin/captive.cgi b/html/cgi-bin/captive.cgi index 8204eb7b3..51c5d45f2 100755 --- a/html/cgi-bin/captive.cgi +++ b/html/cgi-bin/captive.cgi @@ -69,7 +69,7 @@ unless (-e $settingsfile) { system("touch $settingsfile"); } &Header::getcgihash(%cgiparams);
&General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color); &General::readhash("$settingsfile", %settings) if(-f $settingsfile); &General::readhash("${General::swroot}/ethernet/settings", %netsettings);
diff --git a/html/cgi-bin/connscheduler.cgi b/html/cgi-bin/connscheduler.cgi index 90aae52fb..1393df65f 100644 --- a/html/cgi-bin/connscheduler.cgi +++ b/html/cgi-bin/connscheduler.cgi @@ -34,7 +34,7 @@ require '/var/ipfire/connscheduler/lib.pl'; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
my $buttontext = $Lang::tr{'add'}; my $hiddenvalue = 'add'; diff --git a/html/cgi-bin/ddns.cgi b/html/cgi-bin/ddns.cgi index 9b58db895..7e4ddb5b7 100644 --- a/html/cgi-bin/ddns.cgi +++ b/html/cgi-bin/ddns.cgi @@ -37,7 +37,7 @@ undef (@dummy); my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
# Config file for basic configuration. my $settingsfile = "${General::swroot}/ddns/settings"; diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi index 867614f2a..dd379dc47 100644 --- a/html/cgi-bin/dhcp.cgi +++ b/html/cgi-bin/dhcp.cgi @@ -111,7 +111,7 @@ foreach my $itf (@ITFs) { &General::readhash("${General::swroot}/ethernet/settings", %netsettings); &General::readhash("${General::swroot}/main/settings", %mainsettings); &General::readhash("${General::swroot}/time/settings", %timesettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
#Get GUI values &Header::getcgihash(%dhcpsettings); diff --git a/html/cgi-bin/dns.cgi b/html/cgi-bin/dns.cgi index 337166ccf..7dc113582 100755 --- a/html/cgi-bin/dns.cgi +++ b/html/cgi-bin/dns.cgi @@ -65,7 +65,7 @@ my $check_servers; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
&Header::showhttpheaders(); &Header::getcgihash(%cgiparams); diff --git a/html/cgi-bin/dnsforward.cgi b/html/cgi-bin/dnsforward.cgi index ed373c09a..749d1216a 100644 --- a/html/cgi-bin/dnsforward.cgi +++ b/html/cgi-bin/dnsforward.cgi @@ -43,7 +43,7 @@ my $changed = 'no'; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
&Header::showhttpheaders();
diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi index 532f99f91..4f4d63cc8 100644 --- a/html/cgi-bin/firewall.cgi +++ b/html/cgi-bin/firewall.cgi @@ -99,7 +99,7 @@ my $checkorange=''; my @protocols; &General::readhash("${General::swroot}/firewall/settings", %fwdfwsettings); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color); &General::readhash($fwoptions, %optionsfw); &General::readhash($ifacesettings, %ifaces); &General::readhash("$configovpn", %ovpnsettings); diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index fe5117ae5..84b018459 100644 --- a/html/cgi-bin/fwhosts.cgi +++ b/html/cgi-bin/fwhosts.cgi @@ -83,7 +83,7 @@ unless (-e $configsrvgrp) { system("touch $configsrvgrp"); } unless (-e $configlocationgrp) { system("touch $configlocationgrp"); }
&General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color); &General::readhash("${General::swroot}/ethernet/settings", %ownnet); &General::readhash("$configovpn", %ovpnsettings); &General::readhasharray("$configipsec", %ipsecconf); diff --git a/html/cgi-bin/guardian.cgi b/html/cgi-bin/guardian.cgi index 7dc6b0149..fb16be00e 100644 --- a/html/cgi-bin/guardian.cgi +++ b/html/cgi-bin/guardian.cgi @@ -60,7 +60,7 @@ our %netsettings = (); our %color = (); our %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
# File declarations. my $settingsfile = "${General::swroot}/guardian/settings"; diff --git a/html/cgi-bin/gui.cgi b/html/cgi-bin/gui.cgi index f06b0f923..1b316a2a2 100644 --- a/html/cgi-bin/gui.cgi +++ b/html/cgi-bin/gui.cgi @@ -88,7 +88,6 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}") $mainsettings{'WINDOWWITHHOSTNAME'} = $cgiparams{'WINDOWWITHHOSTNAME'}; $mainsettings{'PPPUPDOWNBEEP'} = $cgiparams{'PPPUPDOWNBEEP'}; $mainsettings{'SPEED'} = $cgiparams{'SPEED'};
- $mainsettings{'THEME'} = $cgiparams{'theme'}; $mainsettings{'REFRESHINDEX'} = $cgiparams{'REFRESHINDEX'}; &General::writehash("${General::swroot}/main/settings", %mainsettings); &Lang::reload($cgiparams{'lang'});
@@ -106,12 +105,6 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}") $cgiparams{'PPPUPDOWNBEEP'} = 'on'; }
- if ($mainsettings{'THEME'}) {
$cgiparams{'THEME'} = $mainsettings{'THEME'};
- } else {
$cgiparams{'THEME'} = 'ipfire';
- }
- if($mainsettings{'REFRESHINDEX'}) { $cgiparams{'REFRESHINDEX'} = $mainsettings{'REFRESHINDEX'}; } else {
@@ -134,7 +127,6 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'restore defaults'}") $cgiparams{'PPPUPDOWNBEEP'} = 'on'; $cgiparams{'REFRESHINDEX'} = 'off'; $cgiparams{'SPEED'} = 'on';
- $cgiparams{'THEME'} = 'ipfire';
}
$checked{'WINDOWWITHHOSTNAME'}{'off'} = ''; @@ -210,43 +202,6 @@ END ; }
-print <<END -</select></td></tr> -</table> -END -; -&Header::closebox(); -&Header::openbox('100%','left',$Lang::tr{'theme'}); -print<<END; -<table> -<tr>
<td> </td>
<td><select name='theme'>
-END -;
-my $dir = "/srv/web/ipfire/html/themes"; -local *DH; -my ($item, $file); -my @files;
-# Foreach directory create am theme entry to be selected by user
-opendir (DH, $dir); -while ($file = readdir (DH)) {
- next if ( $file =~ /^./ );
- push (@files, $file);
-} -closedir (DH);
-foreach $item (sort (@files)) {
- if ( "$mainsettings{'THEME'}" eq "$item" ) {
print "<option value='$item' selected='selected'>$item</option>\n";
- } else {
print "<option value='$item'>$item</option>\n";
- }
-}
print <<END </select></td></tr>
</table> diff --git a/html/cgi-bin/hardwaregraphs.cgi b/html/cgi-bin/hardwaregraphs.cgi index 5c677d815..813d32f7b 100644 --- a/html/cgi-bin/hardwaregraphs.cgi +++ b/html/cgi-bin/hardwaregraphs.cgi @@ -33,7 +33,7 @@ require "${General::swroot}/graphs.pl"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", \%mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
my %sensorsettings = ();
diff --git a/html/cgi-bin/hosts.cgi b/html/cgi-bin/hosts.cgi index 1c9df5a62..d9e9cb0af 100644 --- a/html/cgi-bin/hosts.cgi +++ b/html/cgi-bin/hosts.cgi @@ -40,7 +40,7 @@ our $datafile = "${General::swroot}/main/hosts"; #(our: used in subroutine) my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
our %settings = (); #Settings1 diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 83d5f52ba..85c5ddd86 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -44,7 +44,7 @@ my %ignored=();
# Read-in main settings, for language, theme and colors. &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
# Get the available network zones, based on the config type of the system and store # the list of zones in an array. diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi index fdf62361d..4ac237d0f 100644 --- a/html/cgi-bin/index.cgi +++ b/html/cgi-bin/index.cgi @@ -70,7 +70,7 @@ $pppsettings{'PROFILENAME'} = 'None'; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
my $connstate = &Header::connectionstatus();
diff --git a/html/cgi-bin/ipinfo.cgi b/html/cgi-bin/ipinfo.cgi index 31b4a16d4..fd490b08e 100644 --- a/html/cgi-bin/ipinfo.cgi +++ b/html/cgi-bin/ipinfo.cgi @@ -36,7 +36,7 @@ require "${General::swroot}/location-functions.pl"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
my %cgiparams=();
diff --git a/html/cgi-bin/location-block.cgi b/html/cgi-bin/location-block.cgi index 5bd70dfb5..df3f397a6 100644 --- a/html/cgi-bin/location-block.cgi +++ b/html/cgi-bin/location-block.cgi @@ -42,7 +42,7 @@ my %cgiparams = (); &General::readhash("$settingsfile", %settings);
&General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
&Header::showhttpheaders();
diff --git a/html/cgi-bin/logs.cgi/firewalllog.dat b/html/cgi-bin/logs.cgi/firewalllog.dat index 361bf0432..e326d65c0 100644 --- a/html/cgi-bin/logs.cgi/firewalllog.dat +++ b/html/cgi-bin/logs.cgi/firewalllog.dat @@ -27,7 +27,7 @@ require "${General::swroot}/header.pl"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
use POSIX();
diff --git a/html/cgi-bin/logs.cgi/firewalllogcountry.dat b/html/cgi-bin/logs.cgi/firewalllogcountry.dat index e3901b945..a55b80511 100644 --- a/html/cgi-bin/logs.cgi/firewalllogcountry.dat +++ b/html/cgi-bin/logs.cgi/firewalllogcountry.dat @@ -405,7 +405,7 @@ my $color=0; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) { my $mygraph = GD::Graph::pie->new(500, 350); diff --git a/html/cgi-bin/logs.cgi/firewalllogip.dat b/html/cgi-bin/logs.cgi/firewalllogip.dat index 6de4081af..4474a8c59 100644 --- a/html/cgi-bin/logs.cgi/firewalllogip.dat +++ b/html/cgi-bin/logs.cgi/firewalllogip.dat @@ -378,7 +378,7 @@ my $color=0; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) { my $mygraph = GD::Graph::pie->new(500, 350); diff --git a/html/cgi-bin/logs.cgi/firewalllogport.dat b/html/cgi-bin/logs.cgi/firewalllogport.dat index 67fe6aa6e..bcaffad70 100644 --- a/html/cgi-bin/logs.cgi/firewalllogport.dat +++ b/html/cgi-bin/logs.cgi/firewalllogport.dat @@ -378,7 +378,7 @@ use GD::Graph::colour qw( :files ); my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) { my $mygraph = GD::Graph::pie->new(500, 350); diff --git a/html/cgi-bin/logs.cgi/ids.dat b/html/cgi-bin/logs.cgi/ids.dat index 74cad6267..b9c19aa17 100644 --- a/html/cgi-bin/logs.cgi/ids.dat +++ b/html/cgi-bin/logs.cgi/ids.dat @@ -25,7 +25,7 @@ require "${General::swroot}/header.pl"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
use POSIX();
diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat index 1fec05c35..e467e1d2e 100644 --- a/html/cgi-bin/logs.cgi/log.dat +++ b/html/cgi-bin/logs.cgi/log.dat @@ -22,7 +22,7 @@ require "${General::swroot}/header.pl"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
use POSIX();
diff --git a/html/cgi-bin/logs.cgi/ovpnclients.dat b/html/cgi-bin/logs.cgi/ovpnclients.dat index a064893a1..5e2c1ff49 100755 --- a/html/cgi-bin/logs.cgi/ovpnclients.dat +++ b/html/cgi-bin/logs.cgi/ovpnclients.dat @@ -34,7 +34,7 @@ require "${General::swroot}/header.pl"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
# Path and file of the OVPN connections database. my $database = "/var/ipfire/ovpn/clients.db"; diff --git a/html/cgi-bin/logs.cgi/proxylog.dat b/html/cgi-bin/logs.cgi/proxylog.dat index 1d1844e7c..8724768ea 100644 --- a/html/cgi-bin/logs.cgi/proxylog.dat +++ b/html/cgi-bin/logs.cgi/proxylog.dat @@ -35,7 +35,7 @@ my $errormessage = ''; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
my @shortmonths = ( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ); diff --git a/html/cgi-bin/logs.cgi/urlfilter.dat b/html/cgi-bin/logs.cgi/urlfilter.dat index 221ed74ac..554169ab0 100644 --- a/html/cgi-bin/logs.cgi/urlfilter.dat +++ b/html/cgi-bin/logs.cgi/urlfilter.dat @@ -24,7 +24,7 @@ require "${General::swroot}/header.pl"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
my $dbdir = "${General::swroot}/urlfilter/blacklists"; my $logdir = "/var/log/squidGuard"; diff --git a/html/cgi-bin/mail.cgi b/html/cgi-bin/mail.cgi index 7865a1da6..68c516660 100755 --- a/html/cgi-bin/mail.cgi +++ b/html/cgi-bin/mail.cgi @@ -43,7 +43,7 @@ my $errormessage=''; #Read all parameters for site &Header::getcgihash(%cgiparams); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
#Show Headers &Header::showhttpheaders(); diff --git a/html/cgi-bin/mdstat.cgi b/html/cgi-bin/mdstat.cgi index e22856f1f..d476e074d 100644 --- a/html/cgi-bin/mdstat.cgi +++ b/html/cgi-bin/mdstat.cgi @@ -33,7 +33,7 @@ my %color = (); my %mainsettings = ();
&General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
&Header::showhttpheaders(); &Header::openpage($Lang::tr{'status information'}, 1, ''); diff --git a/html/cgi-bin/media.cgi b/html/cgi-bin/media.cgi index 5753bc301..f574729ed 100644 --- a/html/cgi-bin/media.cgi +++ b/html/cgi-bin/media.cgi @@ -33,7 +33,7 @@ require "${General::swroot}/graphs.pl"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
#workaround to suppress a warning when a variable is used only once my @dummy = ( ${Header::colourred} ); diff --git a/html/cgi-bin/memory.cgi b/html/cgi-bin/memory.cgi index 1708b0f32..204365294 100644 --- a/html/cgi-bin/memory.cgi +++ b/html/cgi-bin/memory.cgi @@ -33,7 +33,7 @@ require "${General::swroot}/graphs.pl"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
my @querry = split(/?/,$ENV{'QUERY_STRING'}); $querry[0] = '' unless defined $querry[0]; diff --git a/html/cgi-bin/mpfire.cgi b/html/cgi-bin/mpfire.cgi index 6cec8ff33..c8cfc4b11 100644 --- a/html/cgi-bin/mpfire.cgi +++ b/html/cgi-bin/mpfire.cgi @@ -47,7 +47,7 @@ my $errormessage = ""; my @songs;
&General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
&Header::showhttpheaders();
diff --git a/html/cgi-bin/netexternal.cgi b/html/cgi-bin/netexternal.cgi index 781633c1d..a31502dd0 100644 --- a/html/cgi-bin/netexternal.cgi +++ b/html/cgi-bin/netexternal.cgi @@ -38,7 +38,7 @@ my %mainsettings = (); my %netsettings=(); &General::readhash("${General::swroot}/ethernet/settings", %netsettings); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
my @graphs=(); my %dhcpinfo=(); diff --git a/html/cgi-bin/netinternal.cgi b/html/cgi-bin/netinternal.cgi index 3f2fb56cc..3c2828fbf 100644 --- a/html/cgi-bin/netinternal.cgi +++ b/html/cgi-bin/netinternal.cgi @@ -35,7 +35,7 @@ my %mainsettings = (); my %netsettings=(); &General::readhash("${General::swroot}/ethernet/settings", %netsettings); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
my @graphs=(); my @wireless=(); diff --git a/html/cgi-bin/netother.cgi b/html/cgi-bin/netother.cgi index 6524ad575..cbd2bc228 100755 --- a/html/cgi-bin/netother.cgi +++ b/html/cgi-bin/netother.cgi @@ -33,7 +33,7 @@ require "${General::swroot}/graphs.pl"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
my @pings=();
diff --git a/html/cgi-bin/netovpnrw.cgi b/html/cgi-bin/netovpnrw.cgi index cae7770bb..00ef35337 100755 --- a/html/cgi-bin/netovpnrw.cgi +++ b/html/cgi-bin/netovpnrw.cgi @@ -33,7 +33,7 @@ require "${General::swroot}/graphs.pl"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
my @vpns=();
diff --git a/html/cgi-bin/netovpnsrv.cgi b/html/cgi-bin/netovpnsrv.cgi index ab3548713..a53090f0f 100755 --- a/html/cgi-bin/netovpnsrv.cgi +++ b/html/cgi-bin/netovpnsrv.cgi @@ -33,7 +33,7 @@ require "${General::swroot}/graphs.pl"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
my %vpnsettings = (); &General::readhasharray("${General::swroot}/vpn/config", %vpnsettings); diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 68a70d147..b98d88529 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -47,7 +47,7 @@ undef (@dummy); my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
### ### Initialize variables diff --git a/html/cgi-bin/p2p-block.cgi b/html/cgi-bin/p2p-block.cgi index 04f133142..d14725504 100644 --- a/html/cgi-bin/p2p-block.cgi +++ b/html/cgi-bin/p2p-block.cgi @@ -41,7 +41,7 @@ my %color = (); my %mainsettings = ();
&General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
&Header::showhttpheaders(); &Header::getcgihash(%fwdfwsettings); diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index dd96a92e9..a9e12d23c 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -49,7 +49,7 @@ sub refreshpage{&Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' cont &Header::getcgihash(%cgiparams);
&General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
&Header::openpage($Lang::tr{'pakfire configuration'}, 1); &Header::openbigbox('100%', 'left', '', $errormessage); diff --git a/html/cgi-bin/pppsetup.cgi b/html/cgi-bin/pppsetup.cgi index 4b9b7271b..7597bfbc7 100644 --- a/html/cgi-bin/pppsetup.cgi +++ b/html/cgi-bin/pppsetup.cgi @@ -44,7 +44,7 @@ my $kernel=`/bin/uname -r | /usr/bin/tr -d '\012'`; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
&Header::showhttpheaders();
diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi index a63e1c2df..b6d71db84 100644 --- a/html/cgi-bin/proxy.cgi +++ b/html/cgi-bin/proxy.cgi @@ -39,7 +39,7 @@ my $https_port='444'; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
my %proxysettings=(); my %netsettings=(); diff --git a/html/cgi-bin/qos.cgi b/html/cgi-bin/qos.cgi index 8211a3ca0..1825aca11 100644 --- a/html/cgi-bin/qos.cgi +++ b/html/cgi-bin/qos.cgi @@ -109,7 +109,7 @@ $qossettings{'RED_DEV'} = `cat /var/ipfire/red/iface`; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
my @querry = split(/?/,$ENV{'QUERY_STRING'}); $querry[0] = '' unless defined $querry[0]; diff --git a/html/cgi-bin/remote.cgi b/html/cgi-bin/remote.cgi index 9e566201d..c76f5129e 100644 --- a/html/cgi-bin/remote.cgi +++ b/html/cgi-bin/remote.cgi @@ -40,7 +40,7 @@ my $errormessage=''; my $counter = 0;
&General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
&Header::showhttpheaders();
diff --git a/html/cgi-bin/routing.cgi b/html/cgi-bin/routing.cgi index be21007fa..d2d3bdd26 100644 --- a/html/cgi-bin/routing.cgi +++ b/html/cgi-bin/routing.cgi @@ -40,7 +40,7 @@ our $datafile = "${General::swroot}/main/routing"; #(our: used in subroutine) my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
our %settings = ();
diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi index 4e0f14a01..72e8ac63e 100644 --- a/html/cgi-bin/samba.cgi +++ b/html/cgi-bin/samba.cgi @@ -48,7 +48,7 @@ my %shares = &config("${General::swroot}/samba/shares");
&General::readhash("${General::swroot}/ethernet/settings", %netsettings); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
############################################################################################################################ #################################### Initialisierung von Samba Variablen fr global Settings ############################### diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi index 36954ba70..38b89ef1e 100644 --- a/html/cgi-bin/services.cgi +++ b/html/cgi-bin/services.cgi @@ -34,7 +34,7 @@ my %color = (); my %mainsettings = (); my %netsettings=(); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color); &General::readhash("${General::swroot}/ethernet/settings", %netsettings);
#workaround to suppress a warning when a variable is used only once diff --git a/html/cgi-bin/system.cgi b/html/cgi-bin/system.cgi index 0548dddda..67c479736 100644 --- a/html/cgi-bin/system.cgi +++ b/html/cgi-bin/system.cgi @@ -33,7 +33,7 @@ require "${General::swroot}/graphs.pl"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
my @querry = split(/?/,$ENV{'QUERY_STRING'}); $querry[0] = '' unless defined $querry[0]; diff --git a/html/cgi-bin/tor.cgi b/html/cgi-bin/tor.cgi index ea340b612..f39c0d8da 100644 --- a/html/cgi-bin/tor.cgi +++ b/html/cgi-bin/tor.cgi @@ -88,7 +88,7 @@ our %netsettings = (); our %color = (); our %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
our %settings = ();
diff --git a/html/cgi-bin/traffic.cgi b/html/cgi-bin/traffic.cgi index e19bea20a..cafccf73f 100644 --- a/html/cgi-bin/traffic.cgi +++ b/html/cgi-bin/traffic.cgi @@ -32,7 +32,7 @@ require "${General::swroot}/header.pl"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
my %cgiparams; my %pppsettings; diff --git a/html/cgi-bin/updatexlrator.cgi b/html/cgi-bin/updatexlrator.cgi index c94c34ec1..ec7b75228 100644 --- a/html/cgi-bin/updatexlrator.cgi +++ b/html/cgi-bin/updatexlrator.cgi @@ -103,7 +103,7 @@ my @metadata=(); &General::readhash("${General::swroot}/ethernet/settings", %netsettings); &General::readhash("${General::swroot}/main/settings", %mainsettings); &General::readhash("${General::swroot}/proxy/settings", %proxysettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
$xlratorsettings{'ACTION'} = ''; $xlratorsettings{'ENABLE_LOG'} = 'off'; diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index db442e111..f200f1002 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -54,7 +54,7 @@ my $errormessage = ''; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
&General::readhash("${General::swroot}/ethernet/settings", %netsettings);
diff --git a/html/cgi-bin/vulnerabilities.cgi b/html/cgi-bin/vulnerabilities.cgi index d5f81cdc1..926f043b8 100644 --- a/html/cgi-bin/vulnerabilities.cgi +++ b/html/cgi-bin/vulnerabilities.cgi @@ -47,7 +47,7 @@ my $notice = ""; my %mainsettings = (); my %color = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
my %settings = ( "ENABLE_SMT" => "auto", diff --git a/html/cgi-bin/wakeonlan.cgi b/html/cgi-bin/wakeonlan.cgi index 1f7fde54a..289dc224a 100644 --- a/html/cgi-bin/wakeonlan.cgi +++ b/html/cgi-bin/wakeonlan.cgi @@ -51,7 +51,7 @@ our $datafile = "/var/ipfire/wakeonlan/clients.conf"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
my %netsettings = (); &General::readhash("${General::swroot}/ethernet/settings", %netsettings); diff --git a/html/cgi-bin/wirelessclient.cgi b/html/cgi-bin/wirelessclient.cgi index 63218a021..a7a9881b8 100644 --- a/html/cgi-bin/wirelessclient.cgi +++ b/html/cgi-bin/wirelessclient.cgi @@ -43,7 +43,7 @@ our $datafile = "${General::swroot}/ethernet/wireless"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
our %settings = (); our %netsettings = (); diff --git a/html/cgi-bin/wlanap.cgi b/html/cgi-bin/wlanap.cgi index 575b696d7..01dcaeea2 100644 --- a/html/cgi-bin/wlanap.cgi +++ b/html/cgi-bin/wlanap.cgi @@ -54,7 +54,7 @@ my $country = ''; my $txpower = '';
&General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color); &General::readhash("/var/ipfire/ethernet/settings", %netsettings);
$wlanapsettings{'APMODE'} = 'on'; diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index c76af336d..9f12bbe59 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -114,10 +114,6 @@ sub openpage { $headline = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}"; }
- my @stylesheets = ("style.css");
- if ($THEME_NAME eq "ipfire-rounded") {
push(@stylesheets, "style-rounded.css");
- }
print <<END;
<!DOCTYPE html>
@@ -137,9 +133,9 @@ print <<END; </script> END
- foreach my $stylesheet (@stylesheets) {
print "<link href=\"/themes/ipfire/include/css/$stylesheet\" rel=\"stylesheet\" type=\"text/css\" />\n";
- }
+print "<link href="/themes/ipfire/include/css/style.css" rel="stylesheet" type="text/css" />\n";
if ($settings{'SPEED'} ne 'off') { print <<END diff --git a/src/scripts/makegraphs b/src/scripts/makegraphs index 1dc14b8a3..f8f6f70a9 100644 --- a/src/scripts/makegraphs +++ b/src/scripts/makegraphs @@ -36,7 +36,7 @@ my $path_smartctl = "/usr/sbin/smartctl"; my %color = (); my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color);
if ( $mainsettings{'RRDLOG'} eq "" ){ $mainsettings{'RRDLOG'}="/var/log/rrd"; diff --git a/src/squid-accounting/accounting.cgi b/src/squid-accounting/accounting.cgi index 0fe5ff6b3..751b6e8a5 100755 --- a/src/squid-accounting/accounting.cgi +++ b/src/squid-accounting/accounting.cgi @@ -60,7 +60,7 @@ my $mailfile="${General::swroot}/dma/mail.conf";
&Header::getcgihash(%cgiparams); &General::readhash("${General::swroot}/main/settings", %mainsettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color); &General::readhash("$settingsfile", %settings) if(-f $settingsfile);
if ( -f $mailfile){ diff --git a/src/wio/wio-graphs.pl b/src/wio/wio-graphs.pl index 0cfac20d6..78b6f99dc 100644 --- a/src/wio/wio-graphs.pl +++ b/src/wio/wio-graphs.pl @@ -45,7 +45,7 @@ require '/var/ipfire/lang.pl'; my ( %mainsettings, %color ) = ();
&General::readhash('/var/ipfire/main/settings', %mainsettings); -&General::readhash('/srv/web/ipfire/html/themes/'.$mainsettings{'THEME'}.'/include/colors.txt', %color); +&General::readhash('/srv/web/ipfire/html/themes/ipfire/include/colors.txt', %color);
sub wiograph { my $hostid = $_[0]; diff --git a/src/wio/wio.cgi b/src/wio/wio.cgi index ac8fc1220..1dcec52fe 100644 --- a/src/wio/wio.cgi +++ b/src/wio/wio.cgi @@ -62,7 +62,7 @@ my ( %mainsettings, %mailsettings, %wiosettings, %cgiparams, %netsettings, %ipsh &General::readhash('/var/ipfire/ethernet/settings', %netsettings); &General::readhash('/var/ipfire/dma/mail.conf', %mailsettings); &General::readhash('/var/ipfire/wio/wio.conf', %wiosettings); -&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color); +&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", %color); &General::readhasharray('/var/ipfire/ovpn/ovpnconfig', %ovpnconfighash); &General::readhash('/var/ipfire/ovpn/settings', %ovpnsettings); &General::readhasharray('/var/ipfire/ovpn/ccd.conf', %ovpnccdconfhash); -- 2.20.1