mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-12 01:01:29 +00:00
* Updated to use the new revid system in the parser
This commit is contained in:
parent
2e67b02cc7
commit
31b0865dd5
|
@ -132,7 +132,6 @@ function wfSpecialCite() {
|
|||
$this->mTitle =& $title;
|
||||
$this->mArticle =& $article;
|
||||
|
||||
$wgHooks['ParserGetVariableValueRevid'][] = array( $this, 'revid' );
|
||||
$wgHooks['ParserGetVariableValueVarCache'][] = array( $this, 'varCache' );
|
||||
|
||||
$this->genParserOptions();
|
||||
|
@ -147,7 +146,8 @@ function wfSpecialCite() {
|
|||
$wgHooks['ParserGetVariableValueTs'][] = array( $this, 'timestamp' );
|
||||
|
||||
$msg = wfMsgForContentNoTrans( 'cite_text' );
|
||||
$ret = $wgParser->parse( $msg, &$this->mTitle, $this->mParserOptions );
|
||||
$this->mArticle->fetchContent();
|
||||
$ret = $wgParser->parse( $msg, &$this->mTitle, $this->mParserOptions, false, true, $this->mArticle->getRevIdFetched() );
|
||||
$wgOut->addHtml( $ret->getText() );
|
||||
}
|
||||
|
||||
|
@ -177,13 +177,6 @@ function wfSpecialCite() {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
function revid( &$parser, &$revid ) {
|
||||
$this->mArticle->fetchContent();
|
||||
$revid = $this->mArticle->getRevIdFetched();
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
SpecialPage::addPage( new Cite );
|
||||
|
|
Loading…
Reference in a new issue