Read and load custom theme config if exists

This commit is contained in:
Ilia Rostovtsev
2021-06-20 20:27:58 +03:00
parent 80504935c0
commit 6bfef015a6

View File

@@ -5013,10 +5013,14 @@ $current_theme = $current_themes[0];
@theme_root_directories = map { "$root_directory/$_" } @current_themes;
$theme_root_directory = $theme_root_directories[0];
@theme_configs = ( );
my $theme_tconfig = "$config_directory/$current_theme/config";
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);
}
$tb = defined($tconfig{'cs_header'}) ? "bgcolor=\"#$tconfig{'cs_header'}\"" :