MDL-19690 - Eliminate all remaining $CFG->modpixpath apart from mod/scorm
This commit is contained in:
+3
-2
@@ -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) . "";
|
||||
|
||||
@@ -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
@@ -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.'&fid='.$this->field->id.'&mode=display&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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user