mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Nicer descriptions for proxy
This commit is contained in:
@@ -1005,18 +1005,27 @@ else { return $_[1] ? "*" : $text{'default_serv'}; }
|
||||
}
|
||||
|
||||
# dir_name(struct)
|
||||
# Given a <directory> or similar structure, return a human-readable description
|
||||
sub dir_name
|
||||
{
|
||||
local($dfm, $mat);
|
||||
$_[0]->{'name'} =~ /^(Directory|Files|Location)(Match)?$/;
|
||||
$dfm = $1; $mat = $2;
|
||||
if ($mat) {
|
||||
$_[0]->{'name'} =~ /^(Directory|Files|Location|Proxy)(Match)?$/;
|
||||
my ($dfm, $mat) = ($1, $2);
|
||||
if ($dfm eq "Proxy" && !$mat && $_[0]->{'words'}->[0] eq "*") {
|
||||
# Proxy for all
|
||||
return $text{'dir_proxyall'};
|
||||
}
|
||||
elsif ($mat) {
|
||||
# Match-type directive
|
||||
return "$dfm regexp <tt>".&html_escape($_[0]->{'words'}->[0])."</tt>";
|
||||
}
|
||||
elsif ($_[0]->{'words'}->[0] eq "~") {
|
||||
# Regular expression
|
||||
return "$dfm regexp <tt>".&html_escape($_[0]->{'words'}->[1])."</tt>";
|
||||
}
|
||||
else { return "$dfm <tt>".&html_escape($_[0]->{'words'}->[0])."</tt>"; }
|
||||
else {
|
||||
# Exact match
|
||||
return "$dfm <tt>".&html_escape($_[0]->{'words'}->[0])."</tt>";
|
||||
}
|
||||
}
|
||||
|
||||
# list_user_file(file, &user, &pass)
|
||||
|
||||
@@ -11,7 +11,6 @@ $desc = &text('dir_header', &dir_name($d), &virtual_name($v));
|
||||
&ui_print_header($desc, $text{'dir_title'}, "",
|
||||
undef, undef, undef, undef, &restart_button());
|
||||
|
||||
print &ui_subheading($text{'dir_title'});
|
||||
$sw_icon = { "icon" => "images/show.gif",
|
||||
"name" => $text{'dir_show'},
|
||||
"link" => "show.cgi?virt=$in{'virt'}&idx=$in{'idx'}" };
|
||||
|
||||
@@ -12,7 +12,6 @@ $d = $conf->[$in{'idx'}];
|
||||
$desc = &text('htfile_header', &dir_name($d), "<tt>$in{'file'}</tt>");
|
||||
&ui_print_header($desc, $text{'htfile_title'}, "");
|
||||
|
||||
print "<h3>$text{'htfile_title'}</h3>\n";
|
||||
$sw_icon = { "icon" => "images/show.gif",
|
||||
"name" => $text{'htfile_show'},
|
||||
"link" => "show.cgi?file=".&urlize($in{'file'})."&idx=$in{'idx'}" };
|
||||
|
||||
@@ -13,7 +13,6 @@ $desc = &html_escape($in{'file'});
|
||||
undef, undef, undef, undef, "<a href=\"delete_htaccess.cgi?file=".
|
||||
&urlize($in{'file'})."\">$text{'htindex_delete'}</a>");
|
||||
|
||||
print &ui_subheading($text{'htindex_opts'});
|
||||
$sw_icon = { "icon" => "images/show.gif",
|
||||
"name" => $text{'htindex_show'},
|
||||
"link" => "show.cgi?file=".&urlize($in{'file'}) };
|
||||
|
||||
@@ -158,6 +158,7 @@ manual_editfile=Edit config file:
|
||||
manual_switch=Edit
|
||||
|
||||
dir_title=Per-Directory Options
|
||||
dir_proxyall=All proxy requests
|
||||
dir_header=For $1 on $2
|
||||
dir_show=Show Directives
|
||||
dir_edit=Edit Directives
|
||||
|
||||
@@ -10,7 +10,6 @@ $desc = &text('virt_header', &virtual_name($v));
|
||||
&ui_print_header($desc, $text{'virt_title'}, "", undef, undef, undef, undef, &restart_button());
|
||||
|
||||
# Display header and icons
|
||||
print &ui_subheading($text{'virt_opts2'});
|
||||
$sw_icon = { "icon" => "images/show.gif",
|
||||
"name" => $text{'virt_show'},
|
||||
"link" => "show.cgi?virt=$in{'virt'}" };
|
||||
|
||||
Reference in New Issue
Block a user