X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fskins%2FQuickTemplate.php;h=e8466dc11f94bd5b5c59442ce92540d16919d51a;hb=ee56f00ddf0609082f8ae9a4dc3e6e1b6f54ddfd;hp=7782e70770338b3a08712540480e98f169ce9d59;hpb=a5f91ac24f8253807966140fd3c8666ff6bc2f5c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/skins/QuickTemplate.php b/includes/skins/QuickTemplate.php index 7782e70770..e8466dc11f 100644 --- a/includes/skins/QuickTemplate.php +++ b/includes/skins/QuickTemplate.php @@ -136,18 +136,18 @@ abstract class QuickTemplate { /** * @private - * @param string $str + * @param string $msgKey */ - function msg( $str ) { - echo htmlspecialchars( $this->translator->translate( $str ) ); + function msg( $msgKey ) { + echo htmlspecialchars( wfMessage( $msgKey )->text() ); } /** * @private - * @param string $str + * @param string $msgKey */ - function msgHtml( $str ) { - echo $this->translator->translate( $str ); + function msgHtml( $msgKey ) { + echo wfMessage( $msgKey )->text(); } /** @@ -155,10 +155,10 @@ abstract class QuickTemplate { * @private * @param string $str */ - function msgWiki( $str ) { + function msgWiki( $msgKey ) { global $wgOut; - $text = $this->translator->translate( $str ); + $text = wfMessage( $msgKey )->text(); echo $wgOut->parse( $text ); } @@ -174,12 +174,12 @@ abstract class QuickTemplate { /** * @private * - * @param string $str + * @param string $msgKey * @return bool */ - function haveMsg( $str ) { - $msg = $this->translator->translate( $str ); - return ( $msg != '-' ) && ( $msg != '' ); # ???? + function haveMsg( $msgKey ) { + $msg = wfMessage( $msgKey ); + return $msg->exists() && !$msg->isDisabled(); } /**