Merge "Allow defining clousre for notification icon path"

This commit is contained in:
jenkins-bot 2013-12-19 22:30:52 +00:00 committed by Gerrit Code Review
commit bd07f60b33
2 changed files with 8 additions and 0 deletions

View file

@ -191,6 +191,10 @@ class EchoBasicFormatter extends EchoNotificationFormatter {
if ( !isset( $iconInfo['path'] ) || !$iconInfo['path'] ) {
// Fallback in case icon is not configured; mainly intended for 'site'
$iconInfo = $wgEchoNotificationIcons['placeholder'];
} else {
if ( is_callable( $iconInfo['path'] ) ) {
$iconInfo['path'] = call_user_func( $iconInfo['path'] );
}
}
$iconUrl = "$wgExtensionAssetsPath/{$iconInfo['path']}";
}

View file

@ -177,6 +177,10 @@ abstract class EchoEmailMode {
} else {
if ( !isset( $iconInfo['path'] ) || !$iconInfo['path'] ) {
$iconInfo = $wgEchoNotificationIcons['placeholder'];
} else {
if ( is_callable( $iconInfo['path'] ) ) {
$iconInfo['path'] = call_user_func( $iconInfo['path'] );
}
}
$iconUrl = "$wgExtensionAssetsPath/{$iconInfo['path']}";
}