Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions admin/inst_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions includes/packages.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down