X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Finst_module.php;h=50d2e3e7184b8a6f37d5149f5d9938653355ed3e;hb=b6ae2ddcd0cbc571edd01157ca1c8d44bbe071ef;hp=f92d2c56aef4d53ae7ddf5de89a39818a00c6b0c;hpb=c97042f53b129df7d9b615c43bcb2c470df691c8;p=fa-stable.git diff --git a/admin/inst_module.php b/admin/inst_module.php index f92d2c56..50d2e3e7 100644 --- a/admin/inst_module.php +++ b/admin/inst_module.php @@ -14,10 +14,10 @@ $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root."/includes/packages.inc"); -if ($use_popup_windows) { +if ($SysPrefs->use_popup_windows) { $js = get_js_open_window(900, 500); } -page(_($help_context = "Install/Activate extensions")); +page(_($help_context = "Install/Activate extensions"), false, false, "", $js); include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/admin/db/company_db.inc"); @@ -42,8 +42,8 @@ function local_extension($id) 'active' => false ); - if (file_exists($path_to_root.'/modules/'.$id.'/hooks.php')) { - include_once($path_to_root.'/modules/'.$id.'/hooks.php'); + if (file_exists($path_to_root.'/modules/'.clean_file_name($id).'/hooks.php')) { + include_once($path_to_root.'/modules/'.clean_file_name($id).'/hooks.php'); } $hooks_class = 'hooks_'.$id; if (class_exists($hooks_class, false)) { @@ -212,6 +212,12 @@ if (get_post('Refresh')) { $result = true; 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; + } if (!$ext['active']) $activated = activate_hooks($ext['package'], $comp); else @@ -266,4 +272,3 @@ else end_form(); end_page(); -?> \ No newline at end of file