Index: trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Info.php |
— | — | @@ -26,8 +26,14 @@ |
27 | 27 | $params = func_get_args(); |
28 | 28 | array_shift( $params ); // We already know the $parser ... |
29 | 29 | |
30 | | - $content = array_shift( $params ); // Use only first parameter, ignore the rest (may get meaning later). |
31 | | - $result = smwfEncodeMessages( array( $content ), 'info' ); |
| 30 | + $content = array_shift( $params ); // First parameter is the info message. |
| 31 | + $icon = array_shift( $params ); // Second parameter is icon to use or null when not provided. |
| 32 | + |
| 33 | + if ( is_null( $icon ) || $icon === '' || !in_array( $icon, array( 'info', 'warning' ) ) ) { |
| 34 | + $icon = 'info'; |
| 35 | + } |
| 36 | + |
| 37 | + $result = smwfEncodeMessages( array( $content ), $icon ); |
32 | 38 | |
33 | 39 | // Starting from MW 1.16, there is a more suited method available: Title::isSpecialPage |
34 | 40 | global $wgTitle; |