mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Move special handling for link.cgi out to a theme function
This commit is contained in:
@@ -11652,18 +11652,11 @@ Returns ready to use webprefix
|
||||
=cut
|
||||
sub get_webprefix
|
||||
{
|
||||
my $webprefix = $gconfig{'webprefix'};
|
||||
my $parent_proxy_detected = 0;
|
||||
my $parent_proxy = $ENV{'HTTP_COMPLETE_WEBMIN_PATH'} || $ENV{'HTTP_WEBMIN_PATH'};
|
||||
if ($parent_proxy) {
|
||||
my ($parent_proxy_link) = $parent_proxy =~ /(\S*?\/link\.cgi\/[\d]{8,16})/;
|
||||
my ($parent_proxy_prefix) = $parent_proxy_link =~ /:\d+(\S*?\/link\.cgi\/\S*?\d+)/;
|
||||
if ($parent_proxy_prefix) {
|
||||
$webprefix = $parent_proxy_prefix;
|
||||
$parent_proxy_detected = 1;
|
||||
}
|
||||
}
|
||||
return wantarray ? ($webprefix, $parent_proxy_detected) : $webprefix;
|
||||
&load_theme_library();
|
||||
if (defined(&theme_get_webprefix)) {
|
||||
return &theme_get_webprefix();
|
||||
}
|
||||
return $gconfig{'webprefix'};
|
||||
}
|
||||
|
||||
$done_web_lib_funcs = 1;
|
||||
|
||||
Reference in New Issue
Block a user