From: umherirrender Date: Sun, 25 Aug 2013 16:50:38 +0000 (+0200) Subject: Parse limitation warnings as 'text' and in user language X-Git-Tag: 1.31.0-rc.0~18815^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=889e988ccec3428a10c8313866d1b925a9ff794b;p=lhc%2Fweb%2Fwiklou.git Parse limitation warnings as 'text' and in user language The default limitation warning messages contains wiki markup to get bold text, which does not get parsed with 'escaped' Before using the message class the call was: wfMsgExt( "$limitationType-warning", array( 'parsemag', 'escape' ), $current, $max ); This piece of message does not go into the parser cache. Change-Id: Ibccfacc9a6b9c43491e3b4ca8f5e8f6a6b1efae9 --- diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 1ab29eb159..170148cd8f 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3180,7 +3180,7 @@ class Parser { function limitationWarn( $limitationType, $current = '', $max = '' ) { # does no harm if $current and $max are present but are unnecessary for the message $warning = wfMessage( "$limitationType-warning" )->numParams( $current, $max ) - ->inContentLanguage()->escaped(); + ->inLanguage( $this->mOptions->getUserLangObj() )->text(); $this->mOutput->addWarning( $warning ); $this->addTrackingCategory( "$limitationType-category" ); }