JSONContent: Use self() instead of explicit class name to support subclasses
authorKunal Mehta <legoktm@gmail.com>
Sat, 9 Aug 2014 11:02:33 +0000 (12:02 +0100)
committerKunal Mehta <legoktm@gmail.com>
Sat, 9 Aug 2014 11:02:33 +0000 (12:02 +0100)
Change-Id: I957d6bda626b8e749a99717b5c89c4db38a36bf8

includes/content/JSONContent.php

index 16bb279..f55467f 100644 (file)
@@ -55,7 +55,7 @@ class JSONContent extends TextContent {
         * @return JSONContent
         */
        public function preSaveTransform( Title $title, User $user, ParserOptions $popts ) {
-               return new JSONContent( $this->beautifyJSON() );
+               return new self( $this->beautifyJSON() );
        }
 
        /**