aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Scholer <bscholer@cshl.edu>2012-01-06 13:01:20 -0500
committerBrian Scholer <bscholer@cshl.edu>2012-01-06 13:01:20 -0500
commit4de17f4547a9995827094cc704206bca70dabecc (patch)
treeddd0676034574d4d376797c34a2db13feb5a5308
parentd1910e6dd62bf1c01d4071e55529310700c8df35 (diff)
downloadpfsense-packages-4de17f4547a9995827094cc704206bca70dabecc.tar.gz
pfsense-packages-4de17f4547a9995827094cc704206bca70dabecc.tar.bz2
pfsense-packages-4de17f4547a9995827094cc704206bca70dabecc.zip
Fixed line endings, changed to file_put_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();