From b35e23f2824c128b9eec58237c1098f8fcaba2de Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Thu, 7 Apr 2005 17:03:10 +0000 Subject: Add argument to return $resp->value() (standard PHP array) or $resp->serialize() (XML string). --- etc/inc/pfsense-utils.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'etc/inc') diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 7b53979..4ec1924 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1007,7 +1007,7 @@ function auto_upgrade() { /* * check_firmware_version(): Check whether the current firmware installed is the most recently released. */ -function check_firmware_version() { +function check_firmware_version($return_php = true) { global $g; $versioncheck_base_url = $g['versioncheckbaseurl']; $versioncheck_path = $g['versioncheckpath']; @@ -1023,7 +1023,8 @@ function check_firmware_version() { $resp = $cli->send($msg); if(!$resp) return -1; if($resp->faultCode()) return -1; - return $resp->value(); + if($return_php == false) return $resp->serialize(); + return $resp->value(); } ?> -- cgit v1.1