mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Fix ongoing issues with proxy prefixes in status collection, choosers 1/2
This commit is contained in:
@@ -24,7 +24,7 @@ require Exporter;
|
||||
|
||||
# Add global variables in web-lib.pl
|
||||
push(@EXPORT, qw(&unique));
|
||||
push(@EXPORT, qw($config_directory $var_directory $remote_error_handler %month_to_number_map %number_to_month_map $webmin_feedback_address $default_lang $default_charset $module_index_name $module_index_link %in $in @in $progress_callback_prefix $progress_callback_url $wait_for_debug $wait_for_input @matches $theme_no_table $webmin_logfile $pragma_no_cache));
|
||||
push(@EXPORT, qw($config_directory $var_directory $remote_error_handler %month_to_number_map %number_to_month_map $webmin_feedback_address $default_lang $default_charset $module_index_name $module_index_link %in $in @in $progress_callback_prefix $progress_callback_url $wait_for_debug $wait_for_input @matches $theme_no_table $webmin_logfile $pragma_no_cache $gwebprefix));
|
||||
|
||||
# Functions defined in themes
|
||||
push(@EXPORT, qw(&theme_post_save_domain &theme_post_save_domains &theme_post_save_server &theme_select_server &theme_select_domain &theme_post_save_folder &theme_post_change_modules &theme_address_button &theme_virtualmin_ui_rating_selector &theme_virtualmin_ui_show_cron_time &theme_virtualmin_ui_parse_cron_time &theme_virtualmin_ui_html_editor_bodytags &theme_virtualmin_ui_show_html_editor &theme_post_change_theme &theme_pre_change_theme));
|
||||
|
||||
@@ -123,10 +123,10 @@ if ($in{'frame'} == 0) {
|
||||
}
|
||||
print "<frameset rows='*,50'>\n";
|
||||
print "<frame marginwidth=5 marginheight=5 name=topframe ",
|
||||
"src=\"$gconfig{'webprefix'}/chooser.cgi?frame=1&file=".$ufile.
|
||||
"src=\"$gwebprefix/chooser.cgi?frame=1&file=".$ufile.
|
||||
"&chroot=".$uchroot."&type=".$utype."&add=$add\">\n";
|
||||
print "<frame marginwidth=0 marginheight=0 name=bottomframe ",
|
||||
"src=\"$gconfig{'webprefix'}/chooser.cgi?frame=2&file=".$ufile.
|
||||
"src=\"$gwebprefix/chooser.cgi?frame=2&file=".$ufile.
|
||||
"&chroot=".$uchroot."&type=".$utype."&add=$add\" scrolling=no>\n";
|
||||
print "</frameset>\n";
|
||||
}
|
||||
@@ -199,7 +199,7 @@ EOF
|
||||
$link = "<a href=\"\" onClick='fileclick(\""."e_javascript("$dir$f")."\", $isdir); return false'>";
|
||||
}
|
||||
local @cols;
|
||||
push(@cols, "$link<img border=0 src=$gconfig{'webprefix'}/images/$icon></a>");
|
||||
push(@cols, "$link<img border=0 src=$gwebprefix/images/$icon></a>");
|
||||
push(@cols, "$link".&html_escape($f)."</a>");
|
||||
push(@cols, &nice_size($st[7]));
|
||||
@tm = localtime($st[9]);
|
||||
@@ -212,7 +212,7 @@ EOF
|
||||
closedir(DIR);
|
||||
print &ui_columns_end();
|
||||
if ( $cnt >= 10 ) {
|
||||
print "<script type='text/javascript' src='$gconfig{'webprefix'}/unauthenticated/filter_match.js?28112013'></script>";
|
||||
print "<script type='text/javascript' src='$gwebprefix/unauthenticated/filter_match.js?28112013'></script>";
|
||||
print "<script type='text/javascript'>filter_match_box();</script>";
|
||||
}
|
||||
&popup_footer();
|
||||
|
||||
@@ -51,10 +51,10 @@ if ($in{'multi'}) {
|
||||
print "</script>\n";
|
||||
print "<title>$text{'groups_title1'}</title>\n";
|
||||
print "<frameset cols='50%,50%'>\n";
|
||||
print "<frame src=\"$gconfig{'webprefix'}/group_chooser.cgi?frame=1&multi=1\">\n";
|
||||
print "<frame src=\"$gwebprefix/group_chooser.cgi?frame=1&multi=1\">\n";
|
||||
print "<frameset rows='*,50' frameborder=no>\n";
|
||||
print " <frame src=\"$gconfig{'webprefix'}/group_chooser.cgi?frame=2&multi=1\">\n";
|
||||
print " <frame src=\"$gconfig{'webprefix'}/group_chooser.cgi?frame=3&multi=1\" scrolling=no>\n";
|
||||
print " <frame src=\"$gwebprefix/group_chooser.cgi?frame=2&multi=1\">\n";
|
||||
print " <frame src=\"$gwebprefix/group_chooser.cgi?frame=3&multi=1\" scrolling=no>\n";
|
||||
print "</frameset>\n";
|
||||
print "</frameset>\n";
|
||||
}
|
||||
@@ -86,7 +86,7 @@ if ($in{'multi'}) {
|
||||
}
|
||||
print "</table>\n";
|
||||
if ( $cnt >= 10 ) {
|
||||
print "<script type='text/javascript' src='$gconfig{'webprefix'}/unauthenticated/filter_match.js?28112013'></script>";
|
||||
print "<script type='text/javascript' src='$gwebprefix/unauthenticated/filter_match.js?28112013'></script>";
|
||||
print "<script type='text/javascript'>filter_match_box();</script>";
|
||||
}
|
||||
&popup_footer();
|
||||
@@ -178,7 +178,7 @@ else {
|
||||
}
|
||||
print "</table>\n";
|
||||
if ( $cnt >= 10 ) {
|
||||
print "<script type='text/javascript' src='$gconfig{'webprefix'}/unauthenticated/filter_match.js?28112013'></script>";
|
||||
print "<script type='text/javascript' src='$gwebprefix/unauthenticated/filter_match.js?28112013'></script>";
|
||||
print "<script type='text/javascript'>filter_match_box();</script>";
|
||||
}
|
||||
&popup_footer();
|
||||
|
||||
10
index.cgi
10
index.cgi
@@ -76,10 +76,10 @@ elsif ($gconfig{"notabs_${base_remote_user}"} == 2 ||
|
||||
if ($pos % $cols == 0) { print "<tr $cb>\n"; }
|
||||
print "<td valign=top align=center width=$per\%>\n";
|
||||
local $idx = $m->{'index_link'};
|
||||
print "<table border><tr><td><a href=$gconfig{'webprefix'}/$m->{'dir'}/$idx>",
|
||||
print "<table border><tr><td><a href=$gwebprefix/$m->{'dir'}/$idx>",
|
||||
"<img src=$m->{'dir'}/images/icon.gif border=0 ",
|
||||
"width=48 height=48></a></td></tr></table>\n";
|
||||
print "<a href=$gconfig{'webprefix'}/$m->{'dir'}/$idx>$m->{'desc'}</a></td>\n";
|
||||
print "<a href=$gwebprefix/$m->{'dir'}/$idx>$m->{'desc'}</a></td>\n";
|
||||
if ($pos % $cols == $cols - 1) { print "</tr>\n"; }
|
||||
$pos++;
|
||||
}
|
||||
@@ -122,7 +122,7 @@ else {
|
||||
print "<td class='usercoll' valign=top $tb>", $usercol ? "<br>" :
|
||||
"<img src=images/lc1.gif alt=\"\">","</td>\n";
|
||||
print "<td class='usercolc' $tb> ",
|
||||
"<a href=$gconfig{'webprefix'}/?cat=$c><b>$t</b></a> </td>\n";
|
||||
"<a href=$gwebprefix/?cat=$c><b>$t</b></a> </td>\n";
|
||||
print "<td class='usercolr' valign=top $tb>", $usercol ? "<br>" :
|
||||
"<img src=images/rc1.gif alt=\"\">","</td>\n";
|
||||
}
|
||||
@@ -142,10 +142,10 @@ else {
|
||||
if ($pos % $cols == 0) { print "<tr>\n"; }
|
||||
local $idx = $m->{'index_link'};
|
||||
print "<td valign=top align=center width=$per\%>\n";
|
||||
print "<table border bgcolor=#ffffff><tr><td><a href=$gconfig{'webprefix'}/$m->{'dir'}/$idx>",
|
||||
print "<table border bgcolor=#ffffff><tr><td><a href=$gwebprefix/$m->{'dir'}/$idx>",
|
||||
"<img src=$m->{'dir'}/images/icon.gif alt=\"\" border=0></a>",
|
||||
"</td></tr></table>\n";
|
||||
print "<a href=$gconfig{'webprefix'}/$m->{'dir'}/$idx>$m->{'desc'}</a></td>\n";
|
||||
print "<a href=$gwebprefix/$m->{'dir'}/$idx>$m->{'desc'}</a></td>\n";
|
||||
if ($pos++ % $cols == $cols - 1) { print "</tr>\n"; }
|
||||
}
|
||||
while($pos++ % $cols) {
|
||||
|
||||
@@ -28,10 +28,10 @@ if ($in{'multi'}) {
|
||||
print "</script>\n";
|
||||
print "<title>$text{'modules_title1'}</title>\n";
|
||||
print "<frameset cols='50%,50%'>\n";
|
||||
print "<frame src=\"$gconfig{'webprefix'}/module_chooser.cgi?frame=1&multi=1\">\n";
|
||||
print "<frame src=\"$gwebprefix/module_chooser.cgi?frame=1&multi=1\">\n";
|
||||
print "<frameset rows='*,50' frameborder=no>\n";
|
||||
print " <frame src=\"$gconfig{'webprefix'}/module_chooser.cgi?frame=2&multi=1\">\n";
|
||||
print " <frame src=\"$gconfig{'webprefix'}/module_chooser.cgi?frame=3&multi=1\" scrolling=no>\n";
|
||||
print " <frame src=\"$gwebprefix/module_chooser.cgi?frame=2&multi=1\">\n";
|
||||
print " <frame src=\"$gwebprefix/module_chooser.cgi?frame=3&multi=1\" scrolling=no>\n";
|
||||
print "</frameset>\n";
|
||||
print "</frameset>\n";
|
||||
}
|
||||
|
||||
@@ -956,7 +956,7 @@ sub generate_map_edit
|
||||
elsif ($config{'max_maps'} && @{$mappings} > $config{'max_maps'} &&
|
||||
!$in{'search'}) {
|
||||
# If there are too many, show a search form
|
||||
print &ui_form_start($gconfig{'webprefix'}.$ENV{'SCRIPT_NAME'});
|
||||
print &ui_form_start($gwebprefix.$ENV{'SCRIPT_NAME'});
|
||||
foreach my $i (keys %in) {
|
||||
next if ($i eq 'search');
|
||||
print &ui_hidden($i, $in{$i});
|
||||
|
||||
@@ -637,7 +637,7 @@ if ($first && $first->{'time'} < $cutoff-(24*60*60)) {
|
||||
sub get_status_icon
|
||||
{
|
||||
my ($up) = @_;
|
||||
return $gconfig{'webprefix'}.
|
||||
return $gwebprefix.
|
||||
"/".$module_name."/images/".($up == 1 ? "up.gif" :
|
||||
$up == -1 ? "not.gif" :
|
||||
$up == -2 ? "webmin.gif" :
|
||||
|
||||
@@ -39,7 +39,7 @@ foreach my $s (@serv) {
|
||||
$down += scalar(grep { $_ == 0 } @ups);
|
||||
my $desc = &html_escape($s->{'desc'});
|
||||
if ($can) {
|
||||
$desc = &ui_link("/$module_name/edit_mon.cgi?id=".
|
||||
$desc = &ui_link("$gwebprefix/$module_name/edit_mon.cgi?id=".
|
||||
&urlize($s->{'id'}), $desc);
|
||||
}
|
||||
$table .= &ui_columns_row([
|
||||
|
||||
36
ui-lib.pl
36
ui-lib.pl
@@ -1762,7 +1762,7 @@ sub ui_hidden_javascript
|
||||
return &theme_ui_hidden_javascript(@_)
|
||||
if (defined(&theme_ui_hidden_javascript));
|
||||
my $rv;
|
||||
my $imgdir = "$gconfig{'webprefix'}/images";
|
||||
my $imgdir = "$gwebprefix/images";
|
||||
my ($jscb, $jstb) = ($cb, $tb);
|
||||
$jscb =~ s/'/\\'/g;
|
||||
$jstb =~ s/'/\\'/g;
|
||||
@@ -1859,7 +1859,7 @@ my $divid = "hiddendiv_$name";
|
||||
my $openerid = "hiddenopener_$name";
|
||||
my $defimg = $status ? "open.gif" : "closed.gif";
|
||||
my $defclass = $status ? 'opener_shown' : 'opener_hidden';
|
||||
$rv .= "<a href=\"javascript:hidden_opener('$divid', '$openerid')\" id='$openerid'><img border=0 src='$gconfig{'webprefix'}/images/$defimg' alt='*'></a>\n";
|
||||
$rv .= "<a href=\"javascript:hidden_opener('$divid', '$openerid')\" id='$openerid'><img border=0 src='$gwebprefix/images/$defimg' alt='*'></a>\n";
|
||||
$rv .= "<a href=\"javascript:hidden_opener('$divid', '$openerid')\">$title</a><br>\n";
|
||||
$rv .= "<div class='$defclass' id='$divid'>\n";
|
||||
return $rv;
|
||||
@@ -1898,7 +1898,7 @@ my $openerid = "hiddenopener_$name";
|
||||
my $defimg = $status ? "open.gif" : "closed.gif";
|
||||
my $defclass = $status ? 'opener_shown' : 'opener_hidden';
|
||||
if ($title) {
|
||||
$rrv .= "<a href=\"javascript:hidden_opener('$divid', '$openerid')\" id='$openerid'><img border=0 src='$gconfig{'webprefix'}/images/$defimg'></a>\n";
|
||||
$rrv .= "<a href=\"javascript:hidden_opener('$divid', '$openerid')\" id='$openerid'><img border=0 src='$gwebprefix/images/$defimg'></a>\n";
|
||||
$rrv .= "<a href=\"javascript:hidden_opener('$divid', '$openerid')\">$title</a><br>\n";
|
||||
$rv .= &ui_table_row(undef, $rrv, $main::ui_table_cols);
|
||||
}
|
||||
@@ -1964,7 +1964,7 @@ my $colspan = 1;
|
||||
if (defined($heading) || defined($rightheading)) {
|
||||
$rv .= "<tr".($tb ? " ".$tb : "")."><td>";
|
||||
if (defined($heading)) {
|
||||
$rv .= "<a href=\"javascript:hidden_opener('$divid', '$openerid')\" id='$openerid'><img border=0 src='$gconfig{'webprefix'}/images/$defimg'></a> <a href=\"javascript:hidden_opener('$divid', '$openerid')\"><b><font color='#$text'>$heading</font></b></a></td>";
|
||||
$rv .= "<a href=\"javascript:hidden_opener('$divid', '$openerid')\" id='$openerid'><img border=0 src='$gwebprefix/images/$defimg'></a> <a href=\"javascript:hidden_opener('$divid', '$openerid')\"><b><font color='#$text'>$heading</font></b></a></td>";
|
||||
}
|
||||
if (defined($rightheading)) {
|
||||
$rv .= "<td align='right'>$rightheading</td>";
|
||||
@@ -2040,7 +2040,7 @@ $rv .= "document.${name}_tabtitles = $tabtitles;\n";
|
||||
$rv .= "</script>\n";
|
||||
|
||||
# Output the tabs
|
||||
my $imgdir = "$gconfig{'webprefix'}/images";
|
||||
my $imgdir = "$gwebprefix/images";
|
||||
$rv .= &ui_hidden($name, $sel)."\n";
|
||||
$rv .= "<table border='0' cellpadding='0' cellspacing='0' class='ui_tabs'>\n";
|
||||
$rv .= "<tr><td bgcolor='#ffffff' colspan='".(scalar(@$tabs)*2+1)."'>";
|
||||
@@ -2112,7 +2112,7 @@ sub ui_tabs_end
|
||||
return &theme_ui_tabs_end(@_) if (defined(&theme_ui_tabs_end));
|
||||
my ($border) = @_;
|
||||
my $rv;
|
||||
my $imgdir = "$gconfig{'webprefix'}/images";
|
||||
my $imgdir = "$gwebprefix/images";
|
||||
if ($border) {
|
||||
$rv .= "</td>\n";
|
||||
$rv .= "<td".($cb ? " ".$cb : "")." width='2'><img src='$imgdir/1x1.gif'></td>\n";
|
||||
@@ -2370,7 +2370,7 @@ sub ui_up_down_arrows
|
||||
return &theme_ui_up_down_arrows(@_) if (defined(&theme_ui_up_down_arrows));
|
||||
my ($uplink, $downlink, $upshow, $downshow, $upicon, $downicon) = @_;
|
||||
my $mover;
|
||||
my $imgdir = "$gconfig{'webprefix'}/images";
|
||||
my $imgdir = "$gwebprefix/images";
|
||||
$upicon ||= "$imgdir/moveup.gif";
|
||||
$downicon ||= "$imgdir/movedown.gif";
|
||||
if ($downshow) {
|
||||
@@ -2416,11 +2416,11 @@ my ($direction, $url, $disabled) = @_;
|
||||
my $alt = $direction eq "left" ? '<-' : '->';
|
||||
if ($disabled) {
|
||||
return "<img class='ui_nav_link' alt=\"$alt\" align=\"middle\""
|
||||
. "src=\"$gconfig{'webprefix'}/images/$direction-grey.gif\">\n";
|
||||
. "src=\"$gwebprefix/images/$direction-grey.gif\">\n";
|
||||
}
|
||||
else {
|
||||
return "<a class='ui_nav_link' href=\"$url\"><img class='ui_nav_link' alt=\"$alt\" align=\"middle\""
|
||||
. "src=\"$gconfig{'webprefix'}/images/$direction.gif\"></a>\n";
|
||||
. "src=\"$gwebprefix/images/$direction.gif\"></a>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2593,11 +2593,11 @@ $rv .= &ui_form_start($cgi) if ($cgi);
|
||||
if (@_ > 5) {
|
||||
if ($farleft) {
|
||||
$rv .= "<a href='$farleft'>".
|
||||
"<img src='$gconfig{'webprefix'}/images/first.gif' ".
|
||||
"<img src='$gwebprefix/images/first.gif' ".
|
||||
"border='0' align='middle'></a>\n";
|
||||
}
|
||||
else {
|
||||
$rv .= "<img src='$gconfig{'webprefix'}/images/first-grey.gif' ".
|
||||
$rv .= "<img src='$gwebprefix/images/first-grey.gif' ".
|
||||
"border='0' align='middle'></a>\n";
|
||||
}
|
||||
}
|
||||
@@ -2605,11 +2605,11 @@ if (@_ > 5) {
|
||||
# Left link
|
||||
if ($left) {
|
||||
$rv .= "<a href='$left'>".
|
||||
"<img src=$gconfig{'webprefix'}/images/left.gif ".
|
||||
"<img src=$gwebprefix/images/left.gif ".
|
||||
"border='0' align='middle'></a>\n";
|
||||
}
|
||||
else {
|
||||
$rv .= "<img src=$gconfig{'webprefix'}/images/left-grey.gif ".
|
||||
$rv .= "<img src=$gwebprefix/images/left-grey.gif ".
|
||||
"border='0' align='middle'></a>\n";
|
||||
}
|
||||
|
||||
@@ -2620,11 +2620,11 @@ $rv .= " ".$inputs if ($inputs);
|
||||
# Right link
|
||||
if ($right) {
|
||||
$rv .= "<a href='$right'>".
|
||||
"<img src='$gconfig{'webprefix'}/images/right.gif' ".
|
||||
"<img src='$gwebprefix/images/right.gif' ".
|
||||
"border='0' align='middle'></a>\n";
|
||||
}
|
||||
else {
|
||||
$rv .= "<img src='$gconfig{'webprefix'}/images/right-grey.gif' ".
|
||||
$rv .= "<img src='$gwebprefix/images/right-grey.gif' ".
|
||||
"border='0' align='middle'></a>\n";
|
||||
}
|
||||
|
||||
@@ -2632,11 +2632,11 @@ else {
|
||||
if (@_ > 5) {
|
||||
if ($farright) {
|
||||
$rv .= "<a href='$farright'>".
|
||||
"<img src='$gconfig{'webprefix'}/images/last.gif' ".
|
||||
"<img src='$gwebprefix/images/last.gif' ".
|
||||
"border='0' align='middle'></a>\n";
|
||||
}
|
||||
else {
|
||||
$rv .= "<img src='$gconfig{'webprefix'}/images/last-grey.gif' ".
|
||||
$rv .= "<img src='$gwebprefix/images/last-grey.gif' ".
|
||||
"border='0' align='middle'></a>\n";
|
||||
}
|
||||
}
|
||||
@@ -2679,7 +2679,7 @@ if (defined(&theme_js_redirect)) {
|
||||
$window ||= "window";
|
||||
if ($url =~ /^\//) {
|
||||
# If the URL is like /foo , add webprefix
|
||||
$url = $gconfig{'webprefix'}.$url;
|
||||
$url = $gwebprefix.$url;
|
||||
}
|
||||
return "<script type='text/javascript'>${window}.location = '"."e_escape($url)."';</script>\n";
|
||||
}
|
||||
|
||||
@@ -42,10 +42,10 @@ if ($in{'multi'}) {
|
||||
print "</script>\n";
|
||||
print "<title>$text{'users_title1'}</title>\n";
|
||||
print "<frameset cols='50%,50%'>\n";
|
||||
print "<frame src=\"$gconfig{'webprefix'}/user_chooser.cgi?frame=1&multi=1\">\n";
|
||||
print "<frame src=\"$gwebprefix/user_chooser.cgi?frame=1&multi=1\">\n";
|
||||
print "<frameset rows='*,50' frameborder=no>\n";
|
||||
print " <frame src=\"$gconfig{'webprefix'}/user_chooser.cgi?frame=2&multi=1\">\n";
|
||||
print " <frame src=\"$gconfig{'webprefix'}/user_chooser.cgi?frame=3&multi=1\" scrolling=no>\n";
|
||||
print " <frame src=\"$gwebprefix/user_chooser.cgi?frame=2&multi=1\">\n";
|
||||
print " <frame src=\"$gwebprefix/user_chooser.cgi?frame=3&multi=1\" scrolling=no>\n";
|
||||
print "</frameset>\n";
|
||||
print "</frameset>\n";
|
||||
}
|
||||
@@ -78,7 +78,7 @@ if ($in{'multi'}) {
|
||||
}
|
||||
print "</table>\n";
|
||||
if ( $cnt >= 10 ) {
|
||||
print "<script type='text/javascript' src='$gconfig{'webprefix'}/unauthenticated/filter_match.js?28112013'></script>";
|
||||
print "<script type='text/javascript' src='$gwebprefix/unauthenticated/filter_match.js?28112013'></script>";
|
||||
print "<script type='text/javascript'>filter_match_box();</script>";
|
||||
}
|
||||
&popup_footer();
|
||||
@@ -169,7 +169,7 @@ else {
|
||||
}
|
||||
print "</table>\n";
|
||||
if ( $cnt >= 10 ) {
|
||||
print "<script type='text/javascript' src='$gconfig{'webprefix'}/unauthenticated/filter_match.js?28112013'></script>";
|
||||
print "<script type='text/javascript' src='$gwebprefix/unauthenticated/filter_match.js?28112013'></script>";
|
||||
print "<script type='text/javascript'>filter_match_box();</script>";
|
||||
}
|
||||
&popup_footer();
|
||||
|
||||
@@ -922,7 +922,7 @@ sub read_parse_mime_javascript
|
||||
{
|
||||
my ($id, $fields) = @_;
|
||||
return "" if ($gconfig{'no_upload_tracker'});
|
||||
my $opener = "window.open(\"$gconfig{'webprefix'}/uptracker.cgi?id=$id&uid=$<\", \"uptracker\", \"toolbar=no,menubar=no,scrollbars=no,width=500,height=128\");";
|
||||
my $opener = "window.open(\"$gwebprefix/uptracker.cgi?id=$id&uid=$<\", \"uptracker\", \"toolbar=no,menubar=no,scrollbars=no,width=500,height=128\");";
|
||||
if ($fields) {
|
||||
my $if = join(" || ", map { "typeof($_) != \"undefined\" && $_.value != \"\"" } @$fields);
|
||||
return "onSubmit='if ($if) { $opener }'";
|
||||
@@ -2019,7 +2019,7 @@ my ($w, $h) = (400, 300);
|
||||
if ($gconfig{'db_sizefile'}) {
|
||||
($w, $h) = split(/x/, $gconfig{'db_sizefile'});
|
||||
}
|
||||
return "<input type=button onClick='ifield = form.$_[0]; chooser = window.open(\"$gconfig{'webprefix'}/chooser.cgi?add=$add&type=$_[1]&chroot=$chroot&file=\"+encodeURIComponent(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbars=no,resizable=yes,width=$w,height=$h\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\">\n";
|
||||
return "<input type=button onClick='ifield = form.$_[0]; chooser = window.open(\"$gwebprefix/chooser.cgi?add=$add&type=$_[1]&chroot=$chroot&file=\"+encodeURIComponent(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbars=no,resizable=yes,width=$w,height=$h\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\">\n";
|
||||
}
|
||||
|
||||
=head2 popup_window_button(url, width, height, scrollbars?, &field-mappings)
|
||||
@@ -3656,7 +3656,7 @@ if (defined(&theme_hlink)) {
|
||||
my $mod = $_[2] ? $_[2] : &get_module_name();
|
||||
my $width = $_[3] || $tconfig{'help_width'} || $gconfig{'help_width'} || 600;
|
||||
my $height = $_[4] || $tconfig{'help_height'} || $gconfig{'help_height'} || 400;
|
||||
return "<a onClick='window.open(\"$gconfig{'webprefix'}/help.cgi/$mod/$_[1]\", \"help\", \"toolbar=no,menubar=no,scrollbars=yes,width=$width,height=$height,resizable=yes\"); return false' href=\"$gconfig{'webprefix'}/help.cgi/$mod/$_[1]\">$_[0]</a>";
|
||||
return "<a onClick='window.open(\"$gwebprefix/help.cgi/$mod/$_[1]\", \"help\", \"toolbar=no,menubar=no,scrollbars=yes,width=$width,height=$height,resizable=yes\"); return false' href=\"$gwebprefix/help.cgi/$mod/$_[1]\">$_[0]</a>";
|
||||
}
|
||||
|
||||
=head2 user_chooser_button(field, multiple, [form])
|
||||
@@ -3685,7 +3685,7 @@ if ($_[1] && $gconfig{'db_sizeusers'}) {
|
||||
elsif (!$_[1] && $gconfig{'db_sizeuser'}) {
|
||||
($w, $h) = split(/x/, $gconfig{'db_sizeuser'});
|
||||
}
|
||||
return "<input type=button onClick='ifield = form.$_[0]; chooser = window.open(\"$gconfig{'webprefix'}/user_chooser.cgi?multi=$_[1]&user=\"+escape(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbars=yes,resizable=yes,width=$w,height=$h\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\">\n";
|
||||
return "<input type=button onClick='ifield = form.$_[0]; chooser = window.open(\"$gwebprefix/user_chooser.cgi?multi=$_[1]&user=\"+escape(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbars=yes,resizable=yes,width=$w,height=$h\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\">\n";
|
||||
}
|
||||
|
||||
=head2 group_chooser_button(field, multiple, [form])
|
||||
@@ -3714,7 +3714,7 @@ if ($_[1] && $gconfig{'db_sizeusers'}) {
|
||||
elsif (!$_[1] && $gconfig{'db_sizeuser'}) {
|
||||
($w, $h) = split(/x/, $gconfig{'db_sizeuser'});
|
||||
}
|
||||
return "<input type=button onClick='ifield = form.$_[0]; chooser = window.open(\"$gconfig{'webprefix'}/group_chooser.cgi?multi=$_[1]&group=\"+escape(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbars=yes,resizable=yes,width=$w,height=$h\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\">\n";
|
||||
return "<input type=button onClick='ifield = form.$_[0]; chooser = window.open(\"$gwebprefix/group_chooser.cgi?multi=$_[1]&group=\"+escape(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbars=yes,resizable=yes,width=$w,height=$h\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\">\n";
|
||||
}
|
||||
|
||||
=head2 foreign_check(module, [api-only])
|
||||
@@ -4779,6 +4779,7 @@ $config_file = "$config_directory/config";
|
||||
%gconfig = ( );
|
||||
&read_file_cached($config_file, \%gconfig);
|
||||
$gconfig{'webprefix'} = '' if (!exists($gconfig{'webprefix'}));
|
||||
$gwebprefix = &get_webprefix();
|
||||
$null_file = $gconfig{'os_type'} eq 'windows' ? "NUL" : "/dev/null";
|
||||
$path_separator = $gconfig{'os_type'} eq 'windows' ? ';' : ':';
|
||||
|
||||
@@ -7749,7 +7750,7 @@ my ($w, $h) = (250, 225);
|
||||
if ($gconfig{'db_sizedate'}) {
|
||||
($w, $h) = split(/x/, $gconfig{'db_sizedate'});
|
||||
}
|
||||
return "<input type=button onClick='window.dfield = form.$_[0]; window.mfield = form.$_[1]; window.yfield = form.$_[2]; window.open(\"$gconfig{'webprefix'}/date_chooser.cgi?day=\"+escape(dfield.value)+\"&month=\"+escape(mfield.selectedIndex)+\"&year=\"+yfield.value, \"chooser\", \"toolbar=no,menubar=no,scrollbars=yes,width=$w,height=$h\")' value=\"...\">\n";
|
||||
return "<input type=button onClick='window.dfield = form.$_[0]; window.mfield = form.$_[1]; window.yfield = form.$_[2]; window.open(\"$gwebprefix/date_chooser.cgi?day=\"+escape(dfield.value)+\"&month=\"+escape(mfield.selectedIndex)+\"&year=\"+yfield.value, \"chooser\", \"toolbar=no,menubar=no,scrollbars=yes,width=$w,height=$h\")' value=\"...\">\n";
|
||||
}
|
||||
|
||||
=head2 help_file(module, file)
|
||||
@@ -7862,7 +7863,7 @@ sub help_search_link
|
||||
{
|
||||
if (&foreign_available("man") && !$tconfig{'nosearch'}) {
|
||||
my $for = &urlize(shift(@_));
|
||||
return "<a href='$gconfig{'webprefix'}/man/search.cgi?".
|
||||
return "<a href='$gwebprefix/man/search.cgi?".
|
||||
join("&", map { "section=$_" } @_)."&".
|
||||
"for=$for&exact=1&check=".&get_module_name()."'>".
|
||||
$text{'helpsearch'}."</a>\n";
|
||||
@@ -10120,7 +10121,7 @@ if ($_[1] && $gconfig{'db_sizemodules'}) {
|
||||
elsif (!$_[1] && $gconfig{'db_sizemodule'}) {
|
||||
($w, $h) = split(/x/, $gconfig{'db_sizemodule'});
|
||||
}
|
||||
return "<input type=button onClick='ifield = document.forms[$form].$_[0]; chooser = window.open(\"$gconfig{'webprefix'}/module_chooser.cgi?multi=$_[1]&module=\"+escape(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbars=yes,width=$w,height=$h\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\">\n";
|
||||
return "<input type=button onClick='ifield = document.forms[$form].$_[0]; chooser = window.open(\"$gwebprefix/module_chooser.cgi?multi=$_[1]&module=\"+escape(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbars=yes,width=$w,height=$h\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\">\n";
|
||||
}
|
||||
|
||||
=head2 substitute_template(text, &hash)
|
||||
|
||||
Reference in New Issue
Block a user