mirror of
https://github.com/webmin/webmin.git
synced 2025-08-16 14:51:18 +00:00
Add API to return cached theme info
This commit is contained in:
File diff suppressed because one or more lines are too long
@ -12202,6 +12202,18 @@ my ($user_type) = @_;
|
||||
return &webmin_user_login_mode() eq $user_type;
|
||||
}
|
||||
|
||||
# get_current_theme_info_cached([no-cache])
|
||||
# Returns cached theme info
|
||||
sub get_current_theme_info_cached
|
||||
{
|
||||
my ($nocache) = @_;
|
||||
state %current_theme_info;
|
||||
if (!%current_theme_info || $nocache) {
|
||||
%current_theme_info = &get_theme_info($current_theme);
|
||||
}
|
||||
return \%current_theme_info;
|
||||
}
|
||||
|
||||
$done_web_lib_funcs = 1;
|
||||
|
||||
1;
|
||||
|
Reference in New Issue
Block a user