From: Kunal Mehta Date: Sat, 9 Aug 2014 11:02:33 +0000 (+0100) Subject: JSONContent: Use self() instead of explicit class name to support subclasses X-Git-Tag: 1.31.0-rc.0~14505 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=507f0c923cde3a6bc44fe1764dbd3f1158eb8de7;p=lhc%2Fweb%2Fwiklou.git JSONContent: Use self() instead of explicit class name to support subclasses Change-Id: I957d6bda626b8e749a99717b5c89c4db38a36bf8 --- diff --git a/includes/content/JSONContent.php b/includes/content/JSONContent.php index 16bb27933d..f55467f06f 100644 --- a/includes/content/JSONContent.php +++ b/includes/content/JSONContent.php @@ -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() ); } /**