]> git.mjollnir.org Git - moodle.git/commitdiff
Some hacks to stop the addition of blank lines on Windows machines during editing...
authormoodler <moodler>
Fri, 23 May 2003 14:25:55 +0000 (14:25 +0000)
committermoodler <moodler>
Fri, 23 May 2003 14:25:55 +0000 (14:25 +0000)
admin/lang.php

index 763c3fe23b184fbd781e1b6d7d026fbc2afed756..ec8bfe2bb1685793097000d816756edbc2567fee 100644 (file)
         echo "</CENTER>";
 
         foreach ($stringfiles as $file) {
-
+        
             print_heading("$file", "LEFT", 4);
 
             if (!file_exists("$langdir/$file")) {
                 echo "<TD WIDTH=20% BGCOLOR=\"$THEME->cellheading\" NOWRAP VALIGN=TOP>$key</TD>";
                 echo "<TD WIDTH=40% BGCOLOR=\"$THEME->cellheading\" VALIGN=TOP>$envalue</TD>";
 
-                $value = str_replace("\\","",$string[$key]);          // Delete all slashes
+                $value = $string[$key];
+               $value = str_replace("\r","",$value);
+               $value = str_replace("\n\n\n\n\n\n","\n",$value);
+               $value = str_replace("\n\n\n\n\n","\n",$value);
+               $value = str_replace("\n\n\n\n","\n",$value);
+               $value = str_replace("\n\n\n","\n",$value);
+               $value = str_replace("\n\n\n","\n",$value);
+               $value = str_replace("\\","",$value);          // Delete all slashes
                 $value = str_replace("%%","%",$value);
                 $value = htmlspecialchars($value);