mirror of
https://github.com/webmin/webmin.git
synced 2026-08-04 07:00:41 +01:00
Fix to move module check at the top
This commit is contained in:
@@ -8,6 +8,17 @@ require './xterm-lib.pl';
|
||||
my $wver = &get_webmin_version();
|
||||
$wver =~ s/\.//;
|
||||
|
||||
# Check for needed modules
|
||||
my $modname = "Net::WebSocket::Server";
|
||||
eval "use ${modname};";
|
||||
if ($@) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1, 0);
|
||||
print &text('index_cpan', "<tt>$modname</tt>",
|
||||
"../cpan/download.cgi?source=3&cpan=$modname&mode=2&return=/$module_name/&returndesc=".&urlize($module_info{'desc'})),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
return;
|
||||
}
|
||||
|
||||
# Build Xterm dependency links
|
||||
my $termlinks =
|
||||
{ 'css' => ['xterm.css?$wver'],
|
||||
@@ -131,16 +142,6 @@ if (!$xmlhr) {
|
||||
print "<script>history.replaceState(null, String(), location.pathname);</script>";
|
||||
}
|
||||
|
||||
# Check for needed modules
|
||||
my $modname = "Net::WebSocket::Server";
|
||||
eval "use ${modname};";
|
||||
if ($@) {
|
||||
print &text('index_cpan', "<tt>$modname</tt>",
|
||||
"../cpan/download.cgi?source=3&cpan=$modname&mode=2&return=/$module_name/&returndesc=".&urlize($module_info{'desc'})),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
return;
|
||||
}
|
||||
|
||||
# Find ports already in use
|
||||
&lock_file(&get_miniserv_config_file());
|
||||
my %miniserv;
|
||||
|
||||
Reference in New Issue
Block a user