From 06541ca20ec8687bf8910e30e6ce122da9d28c46 Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Wed, 10 May 2017 12:00:38 +0200 Subject: [PATCH] Remove ^M chars see BT#12478 --- plugin/maintenancemode/plugin.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/maintenancemode/plugin.php b/plugin/maintenancemode/plugin.php index 6bcfcc11ab..3733b247f2 100644 --- a/plugin/maintenancemode/plugin.php +++ b/plugin/maintenancemode/plugin.php @@ -145,6 +145,7 @@ RewriteRule \.*$ '.$append.'/maintenance.html [R=302,L] $newFileContent .= PHP_EOL; $newFileContent .= $contentNoBlock; + $newFileContent = str_replace('\\r', '', $newFileContent); file_put_contents($file, $newFileContent); $handle = curl_init(api_get_path(WEB_PATH)); @@ -161,6 +162,7 @@ RewriteRule \.*$ '.$append.'/maintenance.html [R=302,L] 'warning' ) ); + $originalContent = str_replace('\\r', '', $originalContent); file_put_contents($file, $originalContent); } else { $result = file_put_contents($maintenanceHtml, $content); @@ -176,6 +178,7 @@ RewriteRule \.*$ '.$append.'/maintenance.html [R=302,L] if ($active == false) { Display::addFlash(Display::return_message($plugin->get_lang('MaintenanceModeIsOff'))); + $contentNoBlock = str_replace('\\r', '', $contentNoBlock); file_put_contents($file, $contentNoBlock); } else { Display::addFlash(Display::return_message($plugin->get_lang('MaintenanceModeIsOn')));