]> git.mjollnir.org Git - moodle.git/commitdiff
Works now also with $a->something
authorpaca70 <paca70>
Sat, 19 Apr 2003 17:45:50 +0000 (17:45 +0000)
committerpaca70 <paca70>
Sat, 19 Apr 2003 17:45:50 +0000 (17:45 +0000)
admin/lang.php

index f11e99e1c4c24aac5f5701170ac89e3fb73bdc6c..a1746b7e834cc42b422e3eb73cca799253389836 100644 (file)
             echo "<TABLE WIDTH=\"100%\" CELLPADDING=2 CELLSPACING=3 BORDER=0>";
             foreach ($enstring as $key => $envalue) {
                 $envalue = nl2br(htmlspecialchars($envalue));
-                $envalue = str_replace("\$a","<B>\$a</B>", $envalue);  // Make variables bold
+                $envalue = preg_replace('/(\$a\-\&gt;[a-zA-Z0-9]*|\$a)/', '<b>$0</b>', $envalue);  // Make variables bold. 
                 $envalue = str_replace("%%","%",$envalue);
-                // TODO:  It would be nice if all the $a->something variables were bold too
 
                 echo "<TR>";
                 echo "<TD WIDTH=20% BGCOLOR=\"$THEME->cellheading\" NOWRAP VALIGN=TOP>$key</TD>";