From: daniel Date: Fri, 8 Jun 2012 07:43:45 +0000 (+0200) Subject: generate links and other secondary data for RefreshLinks via ContentHandler X-Git-Tag: 1.31.0-rc.0~22097^2^2~127^2 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=0c0cb97d70d282775c6331aeae4d000548e77300;p=lhc%2Fweb%2Fwiklou.git generate links and other secondary data for RefreshLinks via ContentHandler --- diff --git a/includes/job/RefreshLinksJob.php b/includes/job/RefreshLinksJob.php index fa3a607840..05adec0246 100644 --- a/includes/job/RefreshLinksJob.php +++ b/includes/job/RefreshLinksJob.php @@ -58,11 +58,12 @@ class RefreshLinksJob extends Job { wfProfileIn( __METHOD__.'-parse' ); $options = ParserOptions::newFromUserAndLang( new User, $wgContLang ); - $parserOutput = $wgParser->parse( $revision->getText(), $this->title, $options, true, true, $revision->getId() ); #FIXME: content + $content = $revision->getContent(); + $parserOutput = $content->getParserOutput( $this->title, $revision->getId(), $options, false ); wfProfileOut( __METHOD__.'-parse' ); wfProfileIn( __METHOD__.'-update' ); - $updates = $parserOutput->getSecondaryDataUpdates( $this->title, false ); #FIXME: content handler + $updates = $content->getContentHandler()->getSecondaryDataUpdates( $content, $this->title, null, false, $parserOutput ); DataUpdate::runUpdates( $updates ); wfProfileOut( __METHOD__.'-update' ); @@ -132,11 +133,13 @@ class RefreshLinksJob2 extends Job { return false; } wfProfileIn( __METHOD__.'-parse' ); - $parserOutput = $wgParser->parse( $revision->getText(), $title, $options, true, true, $revision->getId() ); #FIXME: content handler + $options = ParserOptions::newFromUserAndLang( new User, $wgContLang ); + $content = $revision->getContent(); + $parserOutput = $content->getParserOutput( $title, $revision->getId(), $options, false ); wfProfileOut( __METHOD__.'-parse' ); wfProfileIn( __METHOD__.'-update' ); - $updates = $parserOutput->getSecondaryDataUpdates( $title, false ); #FIXME: content handler + $updates = $content->getContentHandler()->getSecondaryDataUpdates( $content, $title, null, false, $parserOutput ); DataUpdate::runUpdates( $updates ); wfProfileOut( __METHOD__.'-update' );