summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-06-26 04:32:16 +0000
committerColin Smith <colin@pfsense.org>2005-06-26 04:32:16 +0000
commitfce971e128f1490c7475398dde47d3976a1a2f83 (patch)
tree9f7992b03e90e4eac634dc787977c7b12a81b004
parent58f8fb104a7f6254fbb8198e550975936e52cd9a (diff)
downloadpfsense-fce971e128f1490c7475398dde47d3976a1a2f83.zip
pfsense-fce971e128f1490c7475398dde47d3976a1a2f83.tar.gz
Do not eval() before_form when syncing.
-rw-r--r--etc/inc/pkg-utils.inc20
1 files 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 {
OpenPOWER on IntegriCloud