Fix call time by reference issues

This commit is contained in:
Antoine Musso 2005-11-27 15:03:56 +00:00
parent b0579cedbf
commit 227917fdf4

View file

@ -59,14 +59,14 @@ function wfSpecialCite() {
$title = Title::newFromText( $page ); $title = Title::newFromText( $page );
$article = new Article( $title ); $article = new Article( $title );
$cform = new CiteForm( &$title ); $cform = new CiteForm( $title );
if ( is_null( $title ) || ! $article->exists() ) if ( is_null( $title ) || ! $article->exists() )
$cform->execute(); $cform->execute();
else { else {
$cform->execute(); $cform->execute();
$cout = new CiteOutput( &$title, &$article ); $cout = new CiteOutput( $title, $article );
$cout->execute(); $cout->execute();
} }
} }
@ -121,7 +121,7 @@ function wfSpecialCite() {
var $mTitle, $mArticle, $mParserOptions; var $mTitle, $mArticle, $mParserOptions;
var $mParser; var $mParser;
function CiteOutput( $title, $article ) { function CiteOutput( &$title, &$article ) {
global $wgHooks, $wgParser; global $wgHooks, $wgParser;
$this->mTitle =& $title; $this->mTitle =& $title;
@ -142,7 +142,7 @@ function wfSpecialCite() {
$msg = wfMsgForContentNoTrans( 'cite_text' ); $msg = wfMsgForContentNoTrans( 'cite_text' );
$this->mArticle->fetchContent(); $this->mArticle->fetchContent();
$ret = $wgParser->parse( $msg, &$this->mTitle, $this->mParserOptions, false, true, $this->mArticle->getRevIdFetched() ); $ret = $wgParser->parse( $msg, $this->mTitle, $this->mParserOptions, false, true, $this->mArticle->getRevIdFetched() );
$wgOut->addHtml( $ret->getText() ); $wgOut->addHtml( $ret->getText() );
} }