Further changes in manufacturing, added unit_cost in issues and requirements
[fa-stable.git] / admin / inst_module.php
index 886ecc91a628f6823879e92a96f172e5dc772f83..2309292bef911ddfda922060b78dfa1900e74010 100644 (file)
@@ -212,6 +212,12 @@ if (get_post('Refresh')) {
        foreach($exts as $i => $ext) {
                if ($ext['package'] && ($ext['active'] ^ check_value('Active'.$i))) 
                {
+                       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']));
+                               continue;
+                       }
                        $activated = activate_hooks($ext['package'], $comp, !$ext['active']);   // change active state
 
                        if ($activated !== null)