diff options
author | Renato Botelho <renato@netgate.com> | 2016-10-14 08:45:49 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-10-14 08:51:54 -0300 |
commit | e717f1617331545a72a075fc05eb50781b6ab63e (patch) | |
tree | a82f03cc3876762f9947e577991e9642f63a555b /src/etc/inc/config.lib.inc | |
parent | 237d29c490d35aab75a159584b33210f89317659 (diff) | |
download | pfsense-e717f1617331545a72a075fc05eb50781b6ab63e.zip pfsense-e717f1617331545a72a075fc05eb50781b6ab63e.tar.gz |
Make $force_binary parameter optional, default to false
Diffstat (limited to 'src/etc/inc/config.lib.inc')
-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 d14f17c..49790d1 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -390,7 +390,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"; @@ -463,7 +463,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")); |