From: Joe Hunt Date: Fri, 15 Dec 2017 07:00:00 +0000 (+0100) Subject: Installing third party extensions broken and FIX X-Git-Tag: v2.4.4~43 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=074e859275e21fa17943e19ade8ef75dbefea9d2;hp=9eec230b546ec5827a9c2e16570240318107006e;p=fa-stable.git Installing third party extensions broken and FIX --- diff --git a/includes/packages.inc b/includes/packages.inc index c3aa518c..6389d5e5 100644 --- a/includes/packages.inc +++ b/includes/packages.inc @@ -732,16 +732,15 @@ function get_package_info($pkg, $type=null, $filter=array(), $outkey=null, $down */ function check_src_ext_version($ext_v) { - global $src_version; - - $compat_levels = 2; // current policy is keeping compatibility on major version level. - $app = explode('.', substr($src_version, 0, strspn($src_version, "0123456789."))); - $pkg = explode('.', substr($ext_v, 0, strspn($ext_v, "0123456789."))); - - for ($i=0; $i < min($compat_levels, count($app)); $i++) - if ($pkg[$i] < $app[$i]) - return false; - - return true; + global $src_version; + if ($ext_v != '-') { + $compat_levels = 2; // current policy is keeping compatibility on major version level. + $app = explode('.', substr($src_version, 0, strspn($src_version, "0123456789."))); + $pkg = explode('.', substr($ext_v, 0, strspn($ext_v, "0123456789."))); + + for ($i=0; $i < min($compat_levels, count($app)); $i++) + if ($pkg[$i] < $app[$i]) + return false; + } + return true; } -