diff options
author | Renato Botelho <renato@netgate.com> | 2016-01-26 13:26:58 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-01-26 13:26:58 -0200 |
commit | f9b0a04d7b604ef3b72ce17e69f52ec8d28a06cd (patch) | |
tree | 479a5c11e18fcb4e69104bbcf8098fc034585544 /src/usr/local | |
parent | d17af2a5d5a1f26ac09e1f637398088e0982c0fe (diff) | |
download | pfsense-f9b0a04d7b604ef3b72ce17e69f52ec8d28a06cd.zip pfsense-f9b0a04d7b604ef3b72ce17e69f52ec8d28a06cd.tar.gz |
Remove dead code used for alternative firmware url
Diffstat (limited to 'src/usr/local')
-rw-r--r-- | src/usr/local/www/system_update_settings.php | 78 |
1 files changed, 20 insertions, 58 deletions
diff --git a/src/usr/local/www/system_update_settings.php b/src/usr/local/www/system_update_settings.php index 58495e6..a5494fc 100644 --- a/src/usr/local/www/system_update_settings.php +++ b/src/usr/local/www/system_update_settings.php @@ -65,39 +65,30 @@ require("guiconfig.inc"); require("pkg-utils.inc"); if ($_POST) { - unset($input_errors); - - /* input validation */ - if (($_POST['alturlenable'] == "yes") && (empty($_POST['firmwareurl']))) { - $input_errors[] = gettext("A Firmware Auto Update Base URL must be specified when \"Use an unofficial server for firmware upgrades\" is enabled."); - } - - if (!$input_errors) { - // Set the firmware branch, but only if we are not using it already - if ($_POST['fwbranch']) { - if (($_POST['fwbranch'] == "development") && is_pkg_installed($g['product_name'] . "-repo")) { - pkg_switch_repo(true); - } else if (($_POST['fwbranch'] == "stable") && is_pkg_installed($g['product_name'] . "-repo-devel")) { - pkg_switch_repo(false); - } - } - - if ($_POST['disablecheck'] == "yes") { - $config['system']['firmware']['disablecheck'] = true; - } else { - unset($config['system']['firmware']['disablecheck']); + // Set the firmware branch, but only if we are not using it already + if ($_POST['fwbranch']) { + if (($_POST['fwbranch'] == "development") && is_pkg_installed($g['product_name'] . "-repo")) { + pkg_switch_repo(true); + } else if (($_POST['fwbranch'] == "stable") && is_pkg_installed($g['product_name'] . "-repo-devel")) { + pkg_switch_repo(false); } + } - if ($_POST['synconupgrade'] == "yes") { - $config['system']['gitsync']['synconupgrade'] = true; - } else { - unset($config['system']['gitsync']['synconupgrade']); - } - $config['system']['gitsync']['repositoryurl'] = $_POST['repositoryurl']; - $config['system']['gitsync']['branch'] = $_POST['branch']; + if ($_POST['disablecheck'] == "yes") { + $config['system']['firmware']['disablecheck'] = true; + } else { + unset($config['system']['firmware']['disablecheck']); + } - write_config(); + if ($_POST['synconupgrade'] == "yes") { + $config['system']['gitsync']['synconupgrade'] = true; + } else { + unset($config['system']['gitsync']['synconupgrade']); } + $config['system']['gitsync']['repositoryurl'] = $_POST['repositoryurl']; + $config['system']['gitsync']['branch'] = $_POST['branch']; + + write_config(); } $curcfg = $config['system']['firmware']; @@ -208,34 +199,5 @@ if (file_exists("/usr/local/bin/git") && $g['platform'] == $g['product_name']) { } // e-o-if(file_exista() print($form); -?> - -<script type="text/javascript"> -//<![CDATA[ -events.push(function() { - // Update firmwareurl from preseturls or from the saved alternate if "Unofficial" is checked - function update_firmwareurl() { - if (!$('#alturlenable').prop('checked')) { - $('#firmwareurl').prop('readonly', true) - $('#firmwareurl').val($('#preseturls').val()); - } else { - $('#firmwareurl').prop('readonly', false) - $('#firmwareurl').val("<?=$config['system']['firmware']['alturl']['firmwareurl']?>"); - } - } - - // Call it when preseturls changes - - $('#preseturls, #alturlenable').on('change', function() { - update_firmwareurl(); - }) - - // And call it on page load - update_firmwareurl(); -}); - -//]]> -</script> -<?php include("foot.inc"); |