diff options
author | Colin Smith <colin@pfsense.org> | 2005-03-31 22:37:21 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-03-31 22:37:21 +0000 |
commit | bdc6989d050955a10f5a7fa23401ffac058691ef (patch) | |
tree | a17687309b736418574e4e7a990a3c28bc179648 /usr | |
parent | 845ea3b6604dfb4a31569c2ddbc086c87b17518e (diff) | |
download | pfsense-bdc6989d050955a10f5a7fa23401ffac058691ef.zip pfsense-bdc6989d050955a10f5a7fa23401ffac058691ef.tar.gz |
Stub in support for alternate versioncheck URLs - honest!
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/system_firmware.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/usr/local/www/system_firmware.php b/usr/local/www/system_firmware.php index a0554e4..15b235a 100755 --- a/usr/local/www/system_firmware.php +++ b/usr/local/www/system_firmware.php @@ -37,18 +37,16 @@ $d_isfwfile = 1; require("guiconfig.inc"); function check_firmware_version() { global $g; $versioncheck_base_url = $g['versioncheckbaseurl']; -"versioncheckbaseurl" => "http://www.pfsense.com", - "versioncheckpath" => "/pfSense/checkversion.php", - if(isset($config['system']['alt_firmware_url']['enabled'])) { - $pkg_config_location = $config['system']['alt_pkgconfig_url']['pkgconfig_base_url'] . $config['system']['alt_pkgconfig_url']['pkgconfig_filename']; - $pkg_config_base_url = $config['system']['alt_pkgconfig_url']['pkgconfig_base_url']; - } + $versioncheck_path = $g['versioncheckpath']; + if(isset($config['system']['alt_firmware_url']['enabled']) and isset($config['system']['alt_firmware_url']['versioncheck_base_url'])) { + $versioncheck_base_url = $config['system']['alt_firmware_url']['versioncheck_base_url']; + $versioncheck_path = '/checkversion.php'; + } $post = "platform=" . rawurlencode($g['platform']) . "&version=" . rawurlencode(trim(file_get_contents("/etc/version"))); - - $rfd = @fsockopen("www.pfSense.com", 80, $errno, $errstr, 3); + $rfd = @fsockopen($versioncheck_base_url, 80, $errno, $errstr, 3); if ($rfd) { - $hdr = "POST HTTP/1.0\r\n"; + $hdr = "POST {$versioncheck_path} HTTP/1.0\r\n"; $hdr .= "Content-Type: application/x-www-form-urlencoded\r\n"; $hdr .= "User-Agent: pfSense-webConfigurator/1.0\r\n"; $hdr .= "Host: www.pfSense.com\r\n"; |