* (bug 15484) Users will now be redirected to the login page when they need to
log in, rather than being shown a page asking them to log in and having to click
another link to actually get to the login page.
+* A JSONContent and JSONContentHandler were added for extensions to extend.
=== Bug fixes in 1.24 ===
* (bug 49116) Footer copyright notice is now always displayed in user language
* @author Kunal Mehta <legoktm@gmail.com>
*/
+/**
+ * @since 1.24
+ */
class JSONContentHandler extends TextContentHandler {
+ /**
+ * The class name of objects that should be created
+ *
+ * @var string
+ */
+ protected $contentClass = 'JSONContent';
+
public function __construct( $modelId = CONTENT_MODEL_JSON ) {
parent::__construct( $modelId, array( CONTENT_FORMAT_JSON ) );
}
*/
public function unserializeContent( $text, $format = null ) {
$this->checkFormat( $format );
- return new JSONContent( $text );
+ return new $this->contentClass( $text );
}
/**
* @return JSONContent
*/
public function makeEmptyContent() {
- return new JSONContent( '' );
+ return new $this->contentClass( '' );
}
/** JSON is English **/