MDL-19690 - Eliminate all remaining $CFG->modpixpath apart from mod/scorm

This commit is contained in:
tjhunt
2009-07-02 12:25:19 +00:00
parent e63f88c9a6
commit 5ef444007d
3 changed files with 5 additions and 5 deletions
+3 -2
View File
@@ -1332,9 +1332,10 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
$customicon = $modinfo->cms[$modnumber]->icon;
if (!empty($customicon)) {
if (substr($customicon, 0, 4) === 'mod/') {
$icon = "$CFG->modpixpath/".substr($customicon, 4);
list($modname, $iconname) = explode('/', substr($customicon, 4), 2);
$icon = $OUTPUT->mod_icon_url($iconname, $modname);
} else {
$icon = "$CFG->pixpath/".$customicon;
$icon = $OUTPUT->old_icon_url($customicon);
}
} else {
$icon = "" . $OUTPUT->mod_icon_url('icon', $mod->modname) . "";
-1
View File
@@ -41,7 +41,6 @@ function setup_core_javascript(page_requirements_manager $requires) {
$config = array(
'wwwroot' => $CFG->httpswwwroot, // Yes, really. See above.
'pixpath' => $CFG->pixpath,
'modpixpath' => $CFG->modpixpath,
'sesskey' => sesskey(),
);
if (debugging('', DEBUG_DEVELOPER)) {
+2 -2
View File
@@ -429,10 +429,10 @@ class data_field_base { // Base class for Database Field Types (see field/*/
* @return string
*/
function image() {
global $CFG;
global $OUTPUT;
$str = '<a href="field.php?d='.$this->data->id.'&amp;fid='.$this->field->id.'&amp;mode=display&amp;sesskey='.sesskey().'">';
$str .= '<img src="'.$CFG->modpixpath.'/data/field/'.$this->type.'/icon.gif" ';
$str .= '<img src="'.$OUTPUT->mod_icon_url('/field/' . $this->type . '/icon', 'data') . '" ';
$str .= 'height="'.$this->iconheight.'" width="'.$this->iconwidth.'" alt="'.$this->type.'" title="'.$this->type.'" /></a>';
return $str;
}