From fce971e128f1490c7475398dde47d3976a1a2f83 Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Sun, 26 Jun 2005 04:32:16 +0000 Subject: Do not eval() before_form when syncing. --- etc/inc/pkg-utils.inc | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index 64d3e70..85c3ea0 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -229,17 +229,15 @@ function sync_package($pkg_name, $sync_depends = true, $show_message = false) { file_notice($package['name'], "The {$package['name']} package is missing its configuration file and must be reinstalled.", "Packages", "/pkg_mgr_install.php?mode=reinstallpkg&pkg={$package['name']}", 1); } else { $pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $package['configurationfile'], "packagegui"); - if(isset($pkg_config['nosync'])) continue; - if($pkg['custom_php_global_functions'] <> "") - eval($pkg['custom_php_global_functions']); - if($pkg_config['custom_php_command_before_form'] <> "") - eval($pkg_config['custom_php_command_before_form']); - if($pkg_config['custom_php_resync_config_command'] <> "") - eval($pkg_config['custom_php_resync_config_command']); - if($sync_depends == true) { - $depends = get_pkg_depends($pkg_name, ".xml", "files", 1); // Call dependency handler and do a little more error checking. - if(is_array($depends)) { - foreach($depends as $item) { + if(isset($pkg_config['nosync'])) continue; + if($pkg['custom_php_global_functions'] <> "") + eval($pkg['custom_php_global_functions']); + if($pkg_config['custom_php_resync_config_command'] <> "") + eval($pkg_config['custom_php_resync_config_command']); + if($sync_depends == true) { + $depends = get_pkg_depends($pkg_name, ".xml", "files", 1); // Call dependency handler and do a little more error checking. + if(is_array($depends)) { + foreach($depends as $item) { if(!file_exists("/usr/local/pkg" . $item)) { file_notice($package['name'], "The {$package['name']} package is missing required dependencies and must be reinstalled.", "Packages", "/pkg_mgr_install.php?mode=reinstallpkg&pkg={$package['name']}", 1); } else { -- cgit v1.1