Fix to only enable theme switcher in debug mode

This commit is contained in:
Ilia Ross
2023-09-29 12:56:23 +03:00
parent 5c54c614e3
commit 9a1e869a82
2 changed files with 5 additions and 1 deletions

View File

@ -12,6 +12,9 @@ my $err = sub {
print("<tt>Cannot change theme : $_[0]</tt>\n");
exit(1);
};
# Check if in debug mode
&$err("Debug mode is not enabled!")
if (!$gconfig{'error_stack'} && !$gconfig{'debug_enabled'});
# Check if allowed to change theme,
# otherwise throw an error
if (!&foreign_available('theme') &&