jenkins-bot has submitted this change and it was merged.
Change subject: Always return unformatted content for unformatted posts
......................................................................
Always return unformatted content for unformatted posts
Prevents accidently requesting the wrong type of content, when
only one type of content should ever be available.
Bug: 57063
Change-Id: I1920f80be8f2df264aca929a1e3060e286c9536a
---
M includes/Model/AbstractRevision.php
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
Werdna: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/Model/AbstractRevision.php
b/includes/Model/AbstractRevision.php
index d2767c9..c8f4268 100644
--- a/includes/Model/AbstractRevision.php
+++ b/includes/Model/AbstractRevision.php
@@ -279,6 +279,9 @@
* @return string
*/
public function getContent( $format = 'html' ) {
+ if ( !$this->isFormatted() ) {
+ return $this->getContentRaw();
+ }
if ( !isset( $this->convertedContent[$format] ) ) {
// check how content is stored & convert to requested
format
$sourceFormat = in_array( 'html', $this->flags ) ?
'html' : 'wikitext';
--
To view, visit https://gerrit.wikimedia.org/r/95567
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1920f80be8f2df264aca929a1e3060e286c9536a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: Werdna <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits