From c2c40105cced1eed5f6d036e83cbf5389fd508d4 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 5 Jun 2005 20:35:38 +0000 Subject: Correctly return packages description --- etc/inc/pfsense-utils.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'etc/inc') diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index fe5e0e4..d6e68eb 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -164,7 +164,7 @@ function return_filename_as_string($filename) { return file_get_contents($filename); } else { return false; - } + } } /****f* pfsense-utils/find_package_description @@ -178,9 +178,9 @@ function find_package_description($package) { if(!file_exists("{$g['tmp_path']}/pkg_config.xml")) fetch_latest_pkg_config(); $pkg_config = parse_xml_config_pkg("{$g['tmp_path']}/pkg_config.xml", "pfsensepkgs"); - foreach($pkgs as $index) { + foreach($pkg_config['packages']['package'] as $index) { if($index['name'] == $package) - return $pkg_config['packages']['package'][$index]['descr'] + return $index['descr']; } return; } @@ -1276,4 +1276,4 @@ function read_body($ch, $string) { return $length; } -?> +?> \ No newline at end of file -- cgit v1.1