]> git.mjollnir.org Git - moodle.git/commitdiff
Much better. No slashes needed AT ALL now, not even for $a variables.
authormartin <martin>
Thu, 26 Sep 2002 03:16:40 +0000 (03:16 +0000)
committermartin <martin>
Thu, 26 Sep 2002 03:16:40 +0000 (03:16 +0000)
Also provided a help button at the top.

admin/lang.php

index 8eba59d3df95ea3bedb1f905f762c80a8dd70c96..a52f188e0380f433d92fa134580baebbb9e8059d 100644 (file)
@@ -1,6 +1,6 @@
 <?PHP // $Id$
 
-       require("../config.php");
+    require("../config.php");
 
     optional_variable($mode, "");
 
             }
         }
 
+        print_heading($strcomparelanguage);
+        echo "<CENTER>";
+        helpbutton("langedit",$strcomparelanguage);
+        echo "</CENTER>";
+
         foreach ($stringfiles as $file) {
 
             print_heading("$file", "LEFT", 4);
             error_reporting(0);
             if ($f = fopen("$langdir/$file","r+")) {
                 $editable = true;
+                fclose($f);
             } else {
                 $editable = false;
                 echo "<P><FONT SIZE=1>".get_string("makeeditable", "", "$langdir/$file")."</FONT></P>";
             echo "<TABLE WIDTH=\"100%\" CELLPADDING=2 CELLSPACING=3 BORDER=0>";
             foreach ($enstring as $key => $envalue) {
                 $envalue = nl2br(htmlentities($envalue));
-                $envalue = str_replace("$"."a", "\\$"."a", $envalue);
                 echo "<TR>";
                 echo "<TD WIDTH=20% BGCOLOR=\"$THEME->cellheading\" NOWRAP VALIGN=TOP>$key</TD>";
                 echo "<TD WIDTH=40% BGCOLOR=\"$THEME->cellheading\" VALIGN=TOP>$envalue</TD>";
 
-                $value = htmlentities($string[$key]);
-                $value = str_replace("$"."a", "\\$"."a", $value);
+                $value = str_replace("\\","",$string[$key]);               // Delete all slashes
+                $value = htmlentities($value);
                 if ($editable) {
                     echo "<TD WIDTH=40% VALIGN=TOP>";
                     if (isset($string[$key])) {