From 03c99bbac0dd4bf1c59c15d8ae3eb2453faf3228 Mon Sep 17 00:00:00 2001 From: Jmeyering Date: Mon, 19 May 2014 12:58:35 -0500 Subject: [PATCH] Allow --- modules/cms/controllers/Index.php | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/modules/cms/controllers/Index.php b/modules/cms/controllers/Index.php index 4130b3e8c..2ba1d2f34 100644 --- a/modules/cms/controllers/Index.php +++ b/modules/cms/controllers/Index.php @@ -1,5 +1,6 @@ convertLineEndings($templateData['markup']); + } + if (!Request::input('templateForceSave') && $template->mtime) { if (Request::input('templateMtime') != $template->mtime) @@ -361,4 +367,20 @@ class Index extends Controller return $settings; } -} \ No newline at end of file + + /** + * convertLineEndings Replaces Windows style (/r/n) line endings with unix style (/n) + * line endings. + * + * @param string $markup The markup to convert to unix style endings + * + * @return string $markup + */ + private function convertLineEndings($markup) + { + $markup = str_replace("\r\n", "\n", $markup); + $markup = str_replace("\r", "\n", $markup); + return $markup; + } + +}