From cdaacf753f7fb10dd87eab8695ee1a099456e297 Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 1 Jul 2009 08:10:06 +0000 Subject: [PATCH] MDL-19674 even uglier hack whcih works around the pixpath problem, the long term solution is to write a new setting --- mod/glossary/settings.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mod/glossary/settings.php b/mod/glossary/settings.php index 8462b06d0a..90a62572c3 100644 --- a/mod/glossary/settings.php +++ b/mod/glossary/settings.php @@ -55,14 +55,15 @@ foreach ($recformats as $format) { asort($formats); $str = ''; +$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 .= ''; $str .= ''; -// 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 = "wwwroot/mod/glossary/formats.php?id=$formatid&mode=edit\">pixpath*/"/t/edit.gif\" alt=\"".get_string("edit")."\" />"; + $eicon = "wwwroot/mod/glossary/formats.php?id=$formatid&mode=edit\">\"".get_string("edit")."\""; 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 = "wwwroot/mod/glossary/formats.php?id=$formatid&mode=visible\">pixpath*/"/t/".$vicon."\" alt=\"$vtitle\" />"; + $vicon = "wwwroot/mod/glossary/formats.php?id=$formatid&mode=visible\">\"$vtitle\""; $str .= ''; $str .= ''; -- 2.39.5
' . $formatname . ''.$eicon.'  '.$vicon.'