Fix regex to extract version and oum
This commit is contained in:
parent
76dbaf46d2
commit
9294253675
|
@ -33,7 +33,7 @@ use base 'Exporter';
|
|||
our @ISA = qw(Exporter);
|
||||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.769";
|
||||
my $pandora_version = "7.0NG.769+ALT";
|
||||
my $pandora_build = "230224";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
|
@ -118,12 +118,12 @@ sub check_lib_version {
|
|||
|
||||
$plugin_version = "0NG.0" if empty($plugin_version);
|
||||
|
||||
my ($main,$oum) = split /NG./, $plugin_version;
|
||||
my ($main,$oum) = $plugin_version =~ m/(\d*\.?\d+)NG\.(\d*\.?\d+)/;
|
||||
|
||||
$main = 0 if empty($main) || !looks_like_number($main);
|
||||
$oum = 0 if empty($oum) || !looks_like_number($oum);
|
||||
|
||||
my ($libmain,$liboum) = split /NG./, $pandora_version;
|
||||
my ($libmain,$liboum) = $pandora_version =~ m/(\d*\.?\d+)NG\.(\d*\.?\d+)/;
|
||||
|
||||
if (($liboum < $oum)
|
||||
|| ($libmain != $main)) {
|
||||
|
|
Loading…
Reference in New Issue