dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Stop mangling $_GET and provide WebRequest::getQueryValuesOnly()"
[lhc/web/wiklou.git]
/
includes
/
content
/
TextContent.php
diff --git
a/includes/content/TextContent.php
b/includes/content/TextContent.php
index
750b958
..
54a57a5
100644
(file)
--- 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() {
* @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' );
$wikitext = $this->convert( CONTENT_MODEL_WIKITEXT, 'lossy' );
+ '@phan-var WikitextContent $wikitext';
if ( $wikitext ) {
return $wikitext->getText();
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() );
*/
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 ) {
// @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
) {
protected function fillParserOutput( Title $title, $revId,
ParserOptions $options, $generateHtml, ParserOutput &$output
) {
- global $wg
Parser, $wg
TextModelsToParse;
+ global $wgTextModelsToParse;
if ( in_array( $this->getModel(), $wgTextModelsToParse ) ) {
// parse just to get links etc into the database, HTML is replaced below.
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 ) {
}
if ( $generateHtml ) {