]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19674 even uglier hack whcih works around the pixpath problem, the long term...
authorskodak <skodak>
Wed, 1 Jul 2009 08:10:06 +0000 (08:10 +0000)
committerskodak <skodak>
Wed, 1 Jul 2009 08:10:06 +0000 (08:10 +0000)
mod/glossary/settings.php

index 8462b06d0ac1172f91ec34db5721f35df00b42e9..90a62572c3f2c6b591838d63c3828f74256c7b21 100644 (file)
@@ -55,14 +55,15 @@ foreach ($recformats as $format) {
 asort($formats);
 
 $str = '<table>';
+$pixpath = "$CFG->wwwroot/pix"; // ugly temporary hack until we get this rewritten to new setting
+// TODO MDL-19674 We cannot refer to $CFG->pixpath here. This code is executed
+// when the structure of the admin tree is being build. $CFG->pixpath is only
+// set up once output has started.
 foreach ($formats as $formatid=>$formatname) {
     $recformat = $DB->get_record('glossary_formats', array('id'=>$formatid));
     $str .= '<tr>';
     $str .= '<td>' . $formatname . '</td>';
-// TODO MDL-19674 We cannot refer to $CFG->pixpath here. This code is executed
-// when the structure of the admin tree is being build. $CFG->pixpath is only
-// set up once output has started.
-    $eicon = "<a title=\"".get_string("edit")."\" href=\"$CFG->wwwroot/mod/glossary/formats.php?id=$formatid&amp;mode=edit\"><img class=\"iconsmall\" src=\"" . /*$CFG->pixpath*/"/t/edit.gif\" alt=\"".get_string("edit")."\" /></a>";
+    $eicon = "<a title=\"".get_string("edit")."\" href=\"$CFG->wwwroot/mod/glossary/formats.php?id=$formatid&amp;mode=edit\"><img class=\"iconsmall\" src=\"$pixpath/t/edit.gif\" alt=\"".get_string("edit")."\" /></a>";
     if ( $recformat->visible ) {
         $vtitle = get_string("hide");
         $vicon  = "hide.gif";
@@ -70,7 +71,7 @@ foreach ($formats as $formatid=>$formatname) {
         $vtitle = get_string("show");
         $vicon  = "show.gif";
     }
-    $vicon = "<a title=\"".$vtitle."\" href=\"$CFG->wwwroot/mod/glossary/formats.php?id=$formatid&amp;mode=visible\"><img class=\"iconsmall\" src=\"" . /*$CFG->pixpath*/"/t/".$vicon."\" alt=\"$vtitle\" /></a>";
+    $vicon = "<a title=\"".$vtitle."\" href=\"$CFG->wwwroot/mod/glossary/formats.php?id=$formatid&amp;mode=visible\"><img class=\"iconsmall\" src=\"$pixpath/t/".$vicon."\" alt=\"$vtitle\" /></a>";
 
     $str .= '<td align="center">'.$eicon.'&nbsp;&nbsp;'.$vicon.'</td>';
     $str .= '</tr>';