diff options
author | Renato Botelho <renato@netgate.com> | 2016-10-14 08:45:49 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-10-14 09:05:44 -0300 |
commit | a942d5b2100f55f83ac1cdd30e04d710cd378399 (patch) | |
tree | 5c7fcf02cb931c1a5f61794873b3f74f0868e25f | |
parent | 72ca7e40d314a39a227404a15d14c91aa740a2c7 (diff) | |
download | pfsense-a942d5b2100f55f83ac1cdd30e04d710cd378399.zip pfsense-a942d5b2100f55f83ac1cdd30e04d710cd378399.tar.gz |
Make $force_binary parameter optional, default to false
-rw-r--r-- | src/etc/inc/config.lib.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc index e0b51e9..1b2cc32 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -491,7 +491,7 @@ function convert_config() { * RESULT * boolean - true if successful, false if not ******/ -function safe_write_file($file, $content, $force_binary) { +function safe_write_file($file, $content, $force_binary = false) { $tmp_file = $file . "." . getmypid(); $write_mode = $force_binary ? "wb" : "w"; @@ -565,7 +565,7 @@ function write_config($desc="Unknown", $backup = true, $write_config_only = fals $xmlconfig = dump_xml_config($config, $g['xml_rootobj']); /* write new configuration */ - if (!safe_write_file("{$g['cf_conf_path']}/config.xml", $xmlconfig, false)) { + if (!safe_write_file("{$g['cf_conf_path']}/config.xml", $xmlconfig)) { log_error(gettext("WARNING: Config contents could not be saved. Could not open file!")); unlock($lockkey); file_notice("config.xml", sprintf(gettext("Unable to open %s/config.xml for writing in write_config()%s"), $g['cf_conf_path'], "\n")); |