From 074e859275e21fa17943e19ade8ef75dbefea9d2 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Fri, 15 Dec 2017 08:00:00 +0100 Subject: [PATCH] Installing third party extensions broken and FIX --- includes/packages.inc | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) 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; } - -- 2.30.2