aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim P <jim@pingle.org>2012-01-06 10:07:52 -0800
committerJim P <jim@pingle.org>2012-01-06 10:07:52 -0800
commita636db5b9205c96b3ca70a7aaaa9e221207ec0d7 (patch)
tree6688889f4f06c5853923fce5cafc713af0fcbc60
parentbe323f2c81a23357869ae23be68057b2469976f1 (diff)
parent4de17f4547a9995827094cc704206bca70dabecc (diff)
downloadpfsense-packages-a636db5b9205c96b3ca70a7aaaa9e221207ec0d7.tar.gz
pfsense-packages-a636db5b9205c96b3ca70a7aaaa9e221207ec0d7.tar.bz2
pfsense-packages-a636db5b9205c96b3ca70a7aaaa9e221207ec0d7.zip
Merge pull request #183 from briantist/master
Fixed line endings, changed to put_file_contents
-rw-r--r--config/filer/filer.inc6
1 files changed, 2 insertions, 4 deletions
diff --git a/config/filer/filer.inc b/config/filer/filer.inc
index 906928f2..b4512a49 100644
--- a/config/filer/filer.inc
+++ b/config/filer/filer.inc
@@ -54,7 +54,7 @@ function sync_package_filer() {
if($config['installedpackages']['filer']['config']!="") {
foreach($config['installedpackages']['filer']['config'] as $file) {
$fname = $file['fullfile'];
- $fdata = base64_decode($file['filedata']);
+ $fdata = str_replace("\r", "", base64_decode($file['filedata']));
if($file['mod']) {
if(!preg_match("/0?[0-7]{3}/", $file['mod']))
$mod = 0700;
@@ -62,9 +62,7 @@ function sync_package_filer() {
$mod = octdec($file['mod']);
}
conf_mount_rw();
- $fhnd = fopen($fname, 'w');
- fwrite($fhnd, $fdata);
- fclose($fhnd);
+ file_put_contents($fname, $fdata);
if($mod)
chmod($fname, $mod);
conf_mount_ro();