MDL-32143 output lib: Add ability have override core icons in dataroot

Searches dataroot/pix/ and dataroot/pix_plugins/type/plugin for icons
to override base install
This commit is contained in:
Eric Merrill 2012-04-05 08:50:16 -04:00
parent 9ad535c550
commit f930cf6b41

View File

@ -941,6 +941,9 @@ class theme_config {
return $imagefile;
}
}
if ($imagefile = $this->image_exists("$CFG->dataroot/pix/$image")) {
return $imagefile;
}
if ($imagefile = $this->image_exists("$CFG->dirroot/pix/$image")) {
return $imagefile;
}
@ -974,6 +977,9 @@ class theme_config {
return $imagefile;
}
}
if ($imagefile = $this->image_exists("$CFG->dataroot/pix_plugins/$type/$plugin/$image")) {
return $imagefile;
}
$dir = get_plugin_directory($type, $plugin);
if ($imagefile = $this->image_exists("$dir/pix/$image")) {
return $imagefile;