Commit 2a693fc4 authored by Ad Schellevis's avatar Ad Schellevis

remove unused parameter from parse_config

parent 74059733
...@@ -34,12 +34,10 @@ require_once("script/load_phalcon.php"); ...@@ -34,12 +34,10 @@ require_once("script/load_phalcon.php");
/****f* config/parse_config /****f* config/parse_config
* NAME * NAME
* parse_config - Read in config.cache or config.xml if needed and return $config array * parse_config - Read in config.cache or config.xml if needed and return $config array
* INPUTS
* $parse - boolean to force parse_config() to read config.xml and generate config.cache
* RESULT * RESULT
* $config - array containing all configuration variables * $config - array containing all configuration variables
******/ ******/
function parse_config($parse = false) function parse_config()
{ {
$cnf = OPNsense\Core\Config::getInstance(); $cnf = OPNsense\Core\Config::getInstance();
if (!$cnf->isValid()) { if (!$cnf->isValid()) {
...@@ -107,7 +105,7 @@ function parse_config_bootup() ...@@ -107,7 +105,7 @@ function parse_config_bootup()
} }
$config = parse_config(true); $config = parse_config();
if ((float)$config['version'] > (float)$g['latest_config']) { if ((float)$config['version'] > (float)$g['latest_config']) {
echo <<<EOD echo <<<EOD
...@@ -301,7 +299,7 @@ function config_restore($conffile) { ...@@ -301,7 +299,7 @@ function config_restore($conffile) {
unlock($lockkey); unlock($lockkey);
$config = parse_config(true); $config = parse_config();
write_config(gettext("Reverted to") . " " . array_pop(explode("/", $conffile)) . ".", false); write_config(gettext("Reverted to") . " " . array_pop(explode("/", $conffile)) . ".", false);
......
...@@ -737,7 +737,7 @@ function reload_interfaces_sync() { ...@@ -737,7 +737,7 @@ function reload_interfaces_sync() {
log_error(gettext("reload_interfaces_sync() is starting.")); log_error(gettext("reload_interfaces_sync() is starting."));
/* parse config.xml again */ /* parse config.xml again */
$config = parse_config(true); $config = parse_config();
/* enable routing */ /* enable routing */
system_routing_enable(); system_routing_enable();
...@@ -787,7 +787,7 @@ function reload_all_sync() { ...@@ -787,7 +787,7 @@ function reload_all_sync() {
global $config, $g; global $config, $g;
/* parse config.xml again */ /* parse config.xml again */
$config = parse_config(true); $config = parse_config();
/* set up our timezone */ /* set up our timezone */
system_timezone_configure(); system_timezone_configure();
......
...@@ -13,7 +13,7 @@ require_once('xmlparse.inc'); ...@@ -13,7 +13,7 @@ require_once('xmlparse.inc');
require_once('config.lib.inc'); require_once('config.lib.inc');
require_once('functions.inc'); require_once('functions.inc');
$config = parse_config(true); $config = parse_config();
$passed_tests = true; $passed_tests = true;
......
...@@ -145,7 +145,7 @@ function add_base_packages_menu_items() { ...@@ -145,7 +145,7 @@ function add_base_packages_menu_items() {
} }
if($modified_config) { if($modified_config) {
write_config(gettext("Restored base_package menus after configuration restore.")); write_config(gettext("Restored base_package menus after configuration restore."));
$config = parse_config(true); $config = parse_config();
} }
} }
...@@ -390,7 +390,7 @@ if ($_POST) { ...@@ -390,7 +390,7 @@ if ($_POST) {
touch("/conf/needs_package_sync"); touch("/conf/needs_package_sync");
/* remove cache, we will force a config reboot */ /* remove cache, we will force a config reboot */
@unlink('/tmp/config.cache'); @unlink('/tmp/config.cache');
$config = parse_config(true); $config = parse_config();
/* extract out rrd items, unset from $config when done */ /* extract out rrd items, unset from $config when done */
if($config['rrddata']) { if($config['rrddata']) {
restore_rrddata(); restore_rrddata();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment