Skip to content

Commit

Permalink
Fix to check if Virtualmin actually has function we want
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Sep 21, 2023
1 parent 8211f7a commit f052a1b
Showing 1 changed file with 29 additions and 25 deletions.
54 changes: 29 additions & 25 deletions authentic-lib.pl
Original file line number Diff line number Diff line change
Expand Up @@ -696,31 +696,35 @@ sub get_sysinfo_vars
# Virtualmin version
if ($has_virtualmin) {
&foreign_require("virtual-server");
my ($major, $minor, $build) = &virtual_server::get_module_version_and_type(1);
my ($vs_license, $__virtual_server_version);
$vs_license = check_pro_package('vm');
$__virtual_server_version = ("$major.$minor".(defined($build) ? ".$build" : '')."");
$virtualmin_version = (
product_version_update($__virtual_server_version, 'v') . " " . (
$vs_license eq '0' ? '' :
''

. ' Pro <div class="btn-group margined-left-4' . $is_hidden_link . '">'
.
( ($vs_license eq '1') ?
' <a data-license class="btn btn-default btn-xxs" data-container="body" title="' .
$theme_text{'right_vlcheck'} . '" href=\'' .
$theme_webprefix . '/virtual-server/licence.cgi\'><i class="fa fa-refresh"></i></a></div>' :
'</div>')
) .
($vs_license eq '1' ? '' : '&nbsp;') .
'<a class="btn btn-default btn-xxs margined-left--1" data-container="body" title="' .
$theme_text{'theme_xhred_sysinfo_vmforum'} .
'" href="https://forum.virtualmin.com" target="_blank"><i class="fa2 fa2-chat fa2-smallerified"></i></a>'
. '<a class="btn btn-default btn-xxs margined-left--1'
. $is_hidden_link . '" data-container="body" title="' . $theme_text{'theme_xhred_sysinfo_vmdocs'} .
'" href="http://www.virtualmin.com/documentation" target="_blank"><i class="fa2 fa2-book fa2-smallerified2"></i></a>'
);
if (defined(&virtual_server::get_module_version_and_type)) {
my ($major, $minor, $build) = &virtual_server::get_module_version_and_type(1);
my ($vs_license, $__virtual_server_version);
$vs_license = check_pro_package('vm');
$__virtual_server_version = ("$major.$minor".(defined($build) ? ".$build" : '')."");
$virtualmin_version = (
product_version_update($__virtual_server_version, 'v') . " " . (
$vs_license eq '0' ? '' :
''

. ' Pro <div class="btn-group margined-left-4' . $is_hidden_link . '">'
.
( ($vs_license eq '1') ?
' <a data-license class="btn btn-default btn-xxs" data-container="body" title="' .
$theme_text{'right_vlcheck'} . '" href=\'' .
$theme_webprefix . '/virtual-server/licence.cgi\'><i class="fa fa-refresh"></i></a></div>' :
'</div>')
) .
($vs_license eq '1' ? '' : '&nbsp;') .
'<a class="btn btn-default btn-xxs margined-left--1" data-container="body" title="' .
$theme_text{'theme_xhred_sysinfo_vmforum'} .
'" href="https://forum.virtualmin.com" target="_blank"><i class="fa2 fa2-chat fa2-smallerified"></i></a>'
. '<a class="btn btn-default btn-xxs margined-left--1'
. $is_hidden_link . '" data-container="body" title="' . $theme_text{'theme_xhred_sysinfo_vmdocs'} .
'" href="http://www.virtualmin.com/documentation" target="_blank"><i class="fa2 fa2-book fa2-smallerified2"></i></a>'
);
} else {
$virtualmin_version = $virtual_server::module_info{'version'};
}
}

# Cloudmin version
Expand Down

0 comments on commit f052a1b

Please sign in to comment.