X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fcontent%2FTextContent.php;h=54a57a55e62e5e7af480715fbddf50839c42035a;hp=750b958eab2a5e30c943ed6924dd9d5f8be2d795;hb=54c93f1d384cd5accd2db2ebbb911e4d627c2980;hpb=3a026473873ac3cc9d5c181f05961f474495d32c diff --git a/includes/content/TextContent.php b/includes/content/TextContent.php index 750b958eab..54a57a55e6 100644 --- a/includes/content/TextContent.php +++ b/includes/content/TextContent.php @@ -155,7 +155,9 @@ class TextContent extends AbstractContent { * @return string|bool The raw text, or false if the conversion failed. */ public function getWikitextForTransclusion() { + /** @var WikitextContent $wikitext */ $wikitext = $this->convert( CONTENT_MODEL_WIKITEXT, 'lossy' ); + '@phan-var WikitextContent $wikitext'; if ( $wikitext ) { return $wikitext->getText(); @@ -214,7 +216,8 @@ class TextContent extends AbstractContent { */ public function diff( Content $that, Language $lang = null ) { $this->checkModelID( $that->getModel() ); - + /** @var self $that */ + '@phan-var self $that'; // @todo could implement this in DifferenceEngine and just delegate here? if ( !$lang ) { @@ -253,11 +256,12 @@ class TextContent extends AbstractContent { protected function fillParserOutput( Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output ) { - global $wgParser, $wgTextModelsToParse; + global $wgTextModelsToParse; if ( in_array( $this->getModel(), $wgTextModelsToParse ) ) { // parse just to get links etc into the database, HTML is replaced below. - $output = $wgParser->parse( $this->getText(), $title, $options, true, true, $revId ); + $output = MediaWikiServices::getInstance()->getParser() + ->parse( $this->getText(), $title, $options, true, true, $revId ); } if ( $generateHtml ) {