- /**
- * Add wikitext to the buffer, assuming that this is the primary text for a page view
- * Saves the text into the parser cache if possible.
- *
- * @param string $text
- * @param Article $article
- * @param bool $cache
- * @deprecated Use Article::outputWikitext
- */
- public function addPrimaryWikiText( $text, $article, $cache = true ) {
- global $wgParser;
-
- wfDeprecated( __METHOD__ );
-
- $popts = $this->parserOptions();
- $popts->setTidy(true);
- $parserOutput = $wgParser->parse( $text, $article->mTitle,
- $popts, true, true, $this->mRevisionId );
- $popts->setTidy(false);
- if ( $cache && $article && $parserOutput->getCacheTime() != -1 ) {
- $parserCache = ParserCache::singleton();
- $parserCache->save( $parserOutput, $article, $popts);
- }
-
- $this->addParserOutput( $parserOutput );
- }
-
- /**
- * @deprecated use addWikiTextTidy()
- */
- public function addSecondaryWikiText( $text, $linestart = true ) {
- wfDeprecated( __METHOD__ );
- $this->addWikiTextTitleTidy($text, $this->getTitle(), $linestart);
- }
-
- /**
- * Add wikitext with tidy enabled
- */
- public function addWikiTextTidy( $text, $linestart = true ) {
- $title = $this->getTitle();
- $this->addWikiTextTitleTidy($text, $title, $linestart);
- }
-