Move loading default theme config to outside of the loop

This commit is contained in:
Ilia Rostovtsev
2021-06-20 21:04:52 +03:00
parent 6bfef015a6
commit e9ade1591c

View File

@@ -5018,11 +5018,11 @@ foreach my $troot (@theme_root_directories) {
my %onetconfig;
&read_file_cached("$troot/config", \%onetconfig);
&read_file_cached("$troot/config", \%tconfig);
if (-r $theme_tconfig) {
&read_file_cached($theme_tconfig, \%tconfig);
}
push(@theme_configs, \%onetconfig);
}
if (-r $theme_tconfig) {
&read_file_cached($theme_tconfig, \%tconfig);
}
$tb = defined($tconfig{'cs_header'}) ? "bgcolor=\"#$tconfig{'cs_header'}\"" :
defined($gconfig{'cs_header'}) ? "bgcolor=\"#$gconfig{'cs_header'}\"" :
"bgcolor=\"#9999ff\"";