summaryrefslogtreecommitdiffstats
path: root/etc/inc/pkg-utils.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-01-15 03:11:31 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-01-15 03:11:31 +0000
commit0831bc8616b85859751d9c30f35030dd35cb3a22 (patch)
treeaf153642965fe43cc7b659427482906eb24912c4 /etc/inc/pkg-utils.inc
parent27128470c5615f743510c55bf2c6a50ea32a91b5 (diff)
downloadpfsense-0831bc8616b85859751d9c30f35030dd35cb3a22.zip
pfsense-0831bc8616b85859751d9c30f35030dd35cb3a22.tar.gz
Fix bugs found by eclipse
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r--etc/inc/pkg-utils.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 9464edd..15b305e 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -156,9 +156,9 @@ function is_freebsd_pkg_installed($pkg) {
*
*/
function get_pkg_depends($pkg_name, $filetype = ".xml", $format = "files", $return_nosync = 1) {
- global $config;
+ global $config;
+ $pkg_id = get_pkg_id($pkg_name);
if(!is_numeric($pkg_name)) {
- $pkg_id = get_pkg_id($pkg_name);
if($pkg_id == -1) return -1; // This package doesn't really exist - exit the function.
} else {
if(!isset($config['installedpackages']['package'][$pkg_id])) return; // No package belongs to the pkg_id passed to this function.
@@ -236,8 +236,8 @@ function sync_package($pkg_name, $sync_depends = true, $show_message = false) {
* The code is obviously wrong, but I'm not sure what it's supposed to do?
*/
if(isset($pkg_config['nosync'])) continue;
- if($pkg['custom_php_global_functions'] <> "")
- eval($pkg['custom_php_global_functions']);
+ if($pkg_config['custom_php_global_functions'] <> "")
+ eval($pkg_config['custom_php_global_functions']);
if($pkg_config['custom_php_resync_config_command'] <> "")
eval($pkg_config['custom_php_resync_config_command']);
if($sync_depends == true) {
OpenPOWER on IntegriCloud