Skip to content

Commit

Permalink
Fix Global Default theme in Usermin Theme #107
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Oct 17, 2023
1 parent 449b0bf commit e2d59a1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion theme/index.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,16 @@ $uth = $gconfig{'theme_'.$remote_user};
print "$text{'index_desc'}<p>\n";
print &ui_form_start("change_theme.cgi");
print &ui_table_start(undef, "width=100%", 2);
my $defaulttheme = &trim(&read_file_contents("$root_directory/defaulttheme"));
if (! -r "$root_directory/$defaulttheme") {
$defaulttheme = 'gray-theme';
if (! -r "$root_directory/$defaulttheme") {
$defaulttheme = "";
}
}
print &ui_table_row($text{'index_sel'},
&ui_select("theme", $uth,
[ [ "", $text{'index_global'} ],
[ [ $defaulttheme, $text{'index_global'} ],
map { [ $_->{'dir'}, $_->{'desc'}."" ] }
@themes ]));

Expand Down

0 comments on commit e2d59a1

Please sign in to comment.