Skip to content

Commit

Permalink
Use JS to preserve the hostname when linking to usermin https://virtu…
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Jun 13, 2017
1 parent 3801b50 commit d254e70
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions postinstall.pl
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ sub module_install
my %uclang;
&read_file("$usermin::config{'usermin_dir'}/custom-lang", \%uclang);
if (!$uclang{'session_postfix'}) {
my $url = &virtual_server::get_virtualmin_url()."/".
$module_name."/usermin.cgi";
my %miniserv;
&get_miniserv_config(\%miniserv);
my $port = $miniserv{'port'};
$uclang{'session_postfix'} =
"<center><a href=$url>$text{'login_forgot2'}</a></center>";
"<center><a href=/$module_name/usermin.cgi ".
"onclick='javascript:event.target.port=$port'>".
"$text{'login_forgot2'}</a></center>";
&write_file("$usermin::config{'usermin_dir'}/custom-lang",
\%uclang);
}
Expand Down

0 comments on commit d254e70

Please sign in to comment.