jenkins-bot has submitted this change and it was merged.

Change subject: Fix content format for ScribuntoContentHander
......................................................................


Fix content format for ScribuntoContentHander

We had intended to use the constant CONTENT_FORMAT_TEXT, but
accidentally used that as a string instead.

Change-Id: I93a2c02d48d3fd7b73530562165d817965e272d1
---
M common/ScribuntoContentHandler.php
1 file changed, 9 insertions(+), 1 deletion(-)

Approvals:
  Demon: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/common/ScribuntoContentHandler.php 
b/common/ScribuntoContentHandler.php
index ba1e17b..14b7935 100644
--- a/common/ScribuntoContentHandler.php
+++ b/common/ScribuntoContentHandler.php
@@ -11,10 +11,18 @@
 
 class ScribuntoContentHandler extends TextContentHandler {
 
-       public function __construct( $modelId = 'Scribunto', $formats = array( 
'CONTENT_FORMAT_TEXT' ) ) {
+       public function __construct( $modelId = 'Scribunto', $formats = array( 
CONTENT_FORMAT_TEXT ) ) {
                parent::__construct( $modelId, $formats );
        }
 
+       public function isSupportedFormat( $format ) {
+               // An error in an earlier version of Scribunto means we might 
see this.
+               if ( $format === 'CONTENT_FORMAT_TEXT' ) {
+                       $format = CONTENT_FORMAT_TEXT;
+               }
+               return parent::isSupportedFormat( $format );
+       }
+
        /**
         * Unserializes a ScribuntoContent object.
         *

-- 
To view, visit https://gerrit.wikimedia.org/r/61468
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I93a2c02d48d3fd7b73530562165d817965e272d1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to