mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RSS
synced 2024-11-12 01:09:31 +00:00
901329cb18
Makes MediaWiki.Files.OneClassPerFile.MultipleFound pass Change-Id: If3313f598589a48b7ad5bae65aed8536de48c0e8
23 lines
747 B
PHP
23 lines
747 B
PHP
<?php
|
|
|
|
class RSSUtils {
|
|
|
|
/**
|
|
* Output an error message, all wraped up nicely.
|
|
* @param String $errorMessageName The system message that this error is
|
|
* @param String|Array $param Error parameter (or parameters)
|
|
* @return String Html that is the error.
|
|
*/
|
|
public static function RSSError( $errorMessageName, $param = false ) {
|
|
// Anything from a parser tag should use Content lang for message,
|
|
// since the cache doesn't vary by user language: use ->inContentLanguage()
|
|
// The ->parse() part makes everything safe from an escaping standpoint.
|
|
|
|
return Html::rawElement( 'span', [ 'class' => 'error' ],
|
|
"Extension:RSS -- Error: " . wfMessage( $errorMessageName )
|
|
->inContentLanguage()->params( $param )->parse()
|
|
);
|
|
}
|
|
|
|
}
|