* Use wfMsgForContentNoTrans() rather than my own function

This commit is contained in:
Ævar Arnfjörð Bjarmason 2005-11-27 00:02:21 +00:00
parent fcbbd70a55
commit 0bd4d4c8ca

View file

@ -118,7 +118,7 @@ function wfSpecialCite() {
} }
class CiteOutput { class CiteOutput {
var $mTitle, $mArticle, $mMsg, $mParserOptions; var $mTitle, $mArticle, $mParserOptions;
var $mParser; var $mParser;
function CiteOutput( $title, $article ) { function CiteOutput( $title, $article ) {
@ -141,20 +141,11 @@ function wfSpecialCite() {
$wgHooks['ParserGetVariableValueTs'][] = array( $this, 'timestamp' ); $wgHooks['ParserGetVariableValueTs'][] = array( $this, 'timestamp' );
$this->genMessage(); $msg = wfMsgForContentNoTrans( 'cite_text' );
$ret = $wgParser->parse( $this->mMsg, &$this->mTitle, $this->mParserOptions ); $ret = $wgParser->parse( $msg, &$this->mTitle, $this->mParserOptions );
$wgOut->addHtml( $ret->getText() ); $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() { function genParserOptions() {
$this->mParserOptions = ParserOptions::newFromUser( $wgUser ); $this->mParserOptions = ParserOptions::newFromUser( $wgUser );
$this->mParserOptions->setDateFormat( MW_DATE_DEFAULT ); $this->mParserOptions->setDateFormat( MW_DATE_DEFAULT );