From 4de17f4547a9995827094cc704206bca70dabecc Mon Sep 17 00:00:00 2001 From: Brian Scholer Date: Fri, 6 Jan 2012 13:01:20 -0500 Subject: Fixed line endings, changed to file_put_contents --- config/filer/filer.inc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'config/filer') 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(); -- cgit v1.2.3