Project continued with rewrites:
[mailer.git] / DOCS / tpl-validator.php
index d5f3c055aa9eb309561c73eb26667da6ee3197b6..6fb9e3c21d226227e8fa82d031c31ab4bc631822 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -48,23 +48,23 @@ if ($_SERVER['argc'] < 2) {
 print "Validating template ".$_SERVER['argv'][1]."...\n";
 
 $doc = new DOMDocument();
-$doc->formatOutput = true;
-$doc->preserveWhiteSpace = false;
+$doc->formatOutput = TRUE;
+$doc->preserveWhiteSpace = FALSE;
 $doc->encoding = 'UTF-8';
 $doc->xmlVersion = '1.1';
 $doc->loadHTMLFile($_SERVER['argv'][1]);
 
 $data = $doc->saveHTML();
 $newData = str_replace("<br>", "<br />\n", $data);
-$newData = str_replace("\n\n", "\n", $newData);
+$newData = str_replace("\n\n", chr(10), $newData);
 
-$array = explode("\n", $newData);
+$array = explode(chr(10), $newData);
 array_shift($array);
 array_shift($array);
 unset($array[count($array) - 1]);
 unset($array[count($array) - 1]);
 
-$newData = implode("\n", $array)."\n";
+$newData = implode(chr(10), $array).chr(10);
 
 // Has a template changed?
 if ($data != $newData) {