mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CiteThisPage
synced 2024-11-12 01:14:26 +00:00
* Use wfMsgForContentNoTrans() rather than my own function
This commit is contained in:
parent
fcbbd70a55
commit
0bd4d4c8ca
|
@ -118,7 +118,7 @@ function wfSpecialCite() {
|
|||
}
|
||||
|
||||
class CiteOutput {
|
||||
var $mTitle, $mArticle, $mMsg, $mParserOptions;
|
||||
var $mTitle, $mArticle, $mParserOptions;
|
||||
var $mParser;
|
||||
|
||||
function CiteOutput( $title, $article ) {
|
||||
|
@ -141,20 +141,11 @@ function wfSpecialCite() {
|
|||
|
||||
$wgHooks['ParserGetVariableValueTs'][] = array( $this, 'timestamp' );
|
||||
|
||||
$this->genMessage();
|
||||
$ret = $wgParser->parse( $this->mMsg, &$this->mTitle, $this->mParserOptions );
|
||||
$msg = wfMsgForContentNoTrans( 'cite_text' );
|
||||
$ret = $wgParser->parse( $msg, &$this->mTitle, $this->mParserOptions );
|
||||
$wgOut->addHtml( $ret->getText() );
|
||||
}
|
||||
|
||||
function genMessage() {
|
||||
global $wgMessageCache;
|
||||
|
||||
$setting = $wgMessageCache->mDisableTransform;
|
||||
$wgMessageCache->disableTransform();
|
||||
$this->mMsg = $wgMessageCache->get( 'cite_text', true, true );
|
||||
$wgMessageCache->mDisableTransform = $setting;
|
||||
}
|
||||
|
||||
function genParserOptions() {
|
||||
$this->mParserOptions = ParserOptions::newFromUser( $wgUser );
|
||||
$this->mParserOptions->setDateFormat( MW_DATE_DEFAULT );
|
||||
|
|
Loading…
Reference in a new issue