jenkins-bot has submitted this change and it was merged.
Change subject: Use CONTENT_FORMAT_JSON instead of "json"
......................................................................
Use CONTENT_FORMAT_JSON instead of "json"
The content format is used only internally,
but is exposed in the documentation of
API's action=edit. On MediaWiki.org (and other
Flow wikis), a format of "json" is displayed,
in addition to "application/json", which is what
Flow should be using.
Some backwards compatibility code is necessary
to make sure existing pages don't break. This is
also what Scribunto does.
Change-Id: Iffe01771c775222f0e885f998f7e5b20a6092e11
---
M includes/Content/BoardContentHandler.php
1 file changed, 11 insertions(+), 1 deletion(-)
Approvals:
EBernhardson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/Content/BoardContentHandler.php
b/includes/Content/BoardContentHandler.php
index 1336b25..82a62a8 100644
--- a/includes/Content/BoardContentHandler.php
+++ b/includes/Content/BoardContentHandler.php
@@ -13,7 +13,17 @@
throw new MWException( __CLASS__." initialised for
invalid content model" );
}
- parent::__construct( 'flow-board', array( 'json' ) );
+ parent::__construct( 'flow-board', array( CONTENT_FORMAT_JSON )
);
+ }
+
+ public function isSupportedFormat( $format ) {
+ // Necessary for backwards-compatability where
+ // the format "json" was used
+ if ( $format === 'json' ) {
+ $format = CONTENT_FORMAT_JSON;
+ }
+
+ return parent::isSupportedFormat( $format );
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/159230
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iffe01771c775222f0e885f998f7e5b20a6092e11
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: SG <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits