From c9938b676878f6e36ab879e25e0b4e03da734957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20H=C3=BCsges?= Date: Wed, 13 May 2015 17:04:11 +0200 Subject: [PATCH] append htaccess after newline --- booster/wp_booster.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/booster/wp_booster.php b/booster/wp_booster.php index 31add37..da918df 100755 --- a/booster/wp_booster.php +++ b/booster/wp_booster.php @@ -44,7 +44,7 @@ function booster_htaccess() { { $wp_htacessfile_contents = file_get_contents($wp_htacessfile); $wp_htacessfile_contents = preg_replace('/#CSS-JS-Booster Start#################################################.*#CSS-JS-Booster End#################################################/ims','',$wp_htacessfile_contents); - $wp_htacessfile_contents = $wp_htacessfile_contents.file_get_contents($booster_htacessfile); + $wp_htacessfile_contents = rtrim($wp_htacessfile_contents)."\n\n".file_get_contents($booster_htacessfile); } else $wp_htacessfile_contents = file_get_contents($booster_htacessfile); @file_put_contents($wp_htacessfile,$wp_htacessfile_contents); @@ -63,6 +63,7 @@ function booster_cleanup() { { $wp_htacessfile_contents = file_get_contents($wp_htacessfile); $wp_htacessfile_contents = preg_replace('/#CSS-JS-Booster Start#################################################.*#CSS-JS-Booster End#################################################/ims','',$wp_htacessfile_contents); + $wp_htacessfile_contents = rtrim($wp_htacessfile_contents)."\n"; @file_put_contents($wp_htacessfile,$wp_htacessfile_contents); }