]> git.mjollnir.org Git - moodle.git/commitdiff
Changed the backup output to convert every "\r\n\" and "\r"
authorstronk7 <stronk7>
Sat, 5 Jul 2003 23:14:16 +0000 (23:14 +0000)
committerstronk7 <stronk7>
Sat, 5 Jul 2003 23:14:16 +0000 (23:14 +0000)
(Windows and Mac line-break sequences) to "\n" (Unix line-break
sequence) to be treated apropiately by nl2br function.
Updated to 0.8.1 alpha

backup/backup_version.php
backup/backuplib.php

index 31b010648282ef144f2216a3a83fce233505be29..017831e8914a598f1fe15731901488a9597b2e10 100644 (file)
@@ -5,6 +5,6 @@
 // database (backup_version) to determine whether upgrades should
 // be performed (see db/backup_*.php)
 
-$backup_version = 2003070402;   // The current version is a date (YYYYMMDDXX)
+$backup_version = 2003070600;   // The current version is a date (YYYYMMDDXX)
 
-$backup_release = "0.8.0 alpha<br><font color=red>Broken compatibility with previous backups !!</font>";  // User-friendly version number
+$backup_release = "0.8.1 alpha";  // User-friendly version number
index 60c2bea626d91e6dd37f9d09a706c0dc87a1c2df..8250e7719d18abd4e0bbc8295e114ee938fa98b1 100644 (file)
         $st = start_tag($tag,$level,$endline);
         $co="";
         if ($to_utf) {
-            $co = utf8_encode(htmlspecialchars($content));
+            $co = preg_replace("/\r\n|\r/", "\n", utf8_encode(htmlspecialchars($content)));
         } else {
-            $co = htmlspecialchars($content);
+            $co = preg_replace("/\r\n|\r/", "\n", htmlspecialchars($content));
         }
         $et = end_tag($tag,0,true);
         return $st.$co.$et;