From: tjhunt Date: Thu, 2 Jul 2009 12:35:13 +0000 (+0000) Subject: MDL-19690 fix some breakage. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=42d5737a945689c5d81c4b0d11b34e2037079849;p=moodle.git MDL-19690 fix some breakage. --- diff --git a/course/lib.php b/course/lib.php index cc6f7b20cb..98897e95bb 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1333,9 +1333,9 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false, if (!empty($customicon)) { if (substr($customicon, 0, 4) === 'mod/') { list($modname, $iconname) = explode('/', substr($customicon, 4), 2); - $icon = $OUTPUT->mod_icon_url($iconname, $modname); + $icon = $OUTPUT->mod_icon_url(str_replace(array('.gif', '.png'), '', $iconname), $modname); } else { - $icon = $OUTPUT->old_icon_url($customicon); + $icon = $OUTPUT->old_icon_url(str_replace(array('.gif', '.png'), '', $customicon)); } } else { $icon = "" . $OUTPUT->mod_icon_url('icon', $mod->modname) . ""; diff --git a/files/index.php b/files/index.php index 96e1c4b090..0ebb046dfb 100644 --- a/files/index.php +++ b/files/index.php @@ -207,7 +207,7 @@ function print_cell($alignment='center', $text=' ', $class='') { } function displaydir($file_info) { - global $CFG; + global $CFG, $OUTPUT; $children = $file_info->get_children(); $parent_info = $file_info->get_parent(); diff --git a/question/category_class.php b/question/category_class.php index 5bfca76f24..95275559fa 100644 --- a/question/category_class.php +++ b/question/category_class.php @@ -84,8 +84,7 @@ class question_category_list_item extends list_item { } } public function item_html($extraargs = array()){ - global $CFG; - $pixpath = $CFG->pixpath; + global $CFG, $OUTPUT; $str = $extraargs['str']; $category = $this->item; @@ -101,7 +100,7 @@ class question_category_list_item extends list_item { if (count($this->parentlist->records)!=1){ // don't allow delete if this is the last category in this context. $item .= ' - ' .$str->delete. ''; + ' .$str->delete. ''; } return $item; @@ -118,7 +117,6 @@ class question_category_list_item extends list_item { class question_category_object { var $str; - var $pixpath; /** * Nested lists to display categories. * @@ -173,7 +171,6 @@ class question_category_object { $this->str->cancel = get_string('cancel'); $this->str->editcategories = get_string('editcategories', 'quiz'); $this->str->page = get_string('page'); - $this->pixpath = $CFG->pixpath; $this->pageurl = $pageurl;