MDL-74498 output: Resolve correct icon for modules
Fixes the resolve_image_location function, which previously returned the 'icon' or 'monologo' icon for modules, no matter the requested image name. Also fixes an incorrect pix_icon() call for the context header, which was hidden by the faulty resolve function.
This commit is contained in:
+10
-8
@@ -2112,15 +2112,17 @@ class theme_config {
|
||||
$candidates = [$image];
|
||||
|
||||
if ($type === 'mod') {
|
||||
if ($image === 'icon') {
|
||||
debugging(
|
||||
"The 'icon' image for activity modules has been replaced with a new 'monologo'. " .
|
||||
"Please update your calling code to fetch the new icon where possible. " .
|
||||
"Called for component {$component}.",
|
||||
DEBUG_DEVELOPER
|
||||
);
|
||||
if ($image === 'icon' || $image === 'monologo') {
|
||||
$candidates = ['monologo', 'icon'];
|
||||
if ($image === 'icon') {
|
||||
debugging(
|
||||
"The 'icon' image for activity modules has been replaced with a new 'monologo'. " .
|
||||
"Please update your calling code to fetch the new icon where possible. " .
|
||||
"Called for component {$component}.",
|
||||
DEBUG_DEVELOPER
|
||||
);
|
||||
}
|
||||
}
|
||||
$candidates = ['monologo', 'icon'];
|
||||
}
|
||||
foreach ($candidates as $image) {
|
||||
if ($imagefile = $this->image_exists("$this->dir/pix_plugins/$type/$plugin/$image", $svg)) {
|
||||
|
||||
Reference in New Issue
Block a user