diff --git a/admin/inst_module.php b/admin/inst_module.php index 2309292be..d461956d1 100644 --- a/admin/inst_module.php +++ b/admin/inst_module.php @@ -214,8 +214,8 @@ function company_extensions($id) { if (check_value('Active'.$i) && !check_src_ext_version($ext['version'])) { - display_warning(sprintf(_("Package '%s' is incompatible with current application version and cannot be activated.\n") - . _("Check Install/Activate page for newer package version."), $ext['name'])); + display_warning(sprintf(_("Package '%s' version '%s' is incompatible with current application version and cannot be activated.\n") + . _("Check Install/Activate page for newer package version."), $ext['name'], $ext['version'])); continue; } $activated = activate_hooks($ext['package'], $comp, !$ext['active']); // change active state diff --git a/includes/packages.inc b/includes/packages.inc index 99b620d30..8be885389 100644 --- a/includes/packages.inc +++ b/includes/packages.inc @@ -733,6 +733,10 @@ function check_src_ext_version($ext_v) $app = explode('.', substr($src_version, 0, strspn($src_version, "0123456789."))); $pkg = explode('.', substr($ext_v, 0, strspn($ext_v, "0123456789."))); + if ($ext_v == '' || $ext_v == '-') { + return true; + } + for ($i=0; $i < min($compat_levels, count($app)); $i++) if ($pkg[$i] < $app[$i]) return false;