diff --git a/common/ScribuntoContentHandler.php b/common/ScribuntoContentHandler.php index c6f0c65f..f139ccf6 100644 --- a/common/ScribuntoContentHandler.php +++ b/common/ScribuntoContentHandler.php @@ -9,7 +9,7 @@ * @author Brad Jorsch */ -class ScribuntoContentHandler extends TextContentHandler { +class ScribuntoContentHandler extends CodeContentHandler { /** * @param string $modelId @@ -21,6 +21,10 @@ class ScribuntoContentHandler extends TextContentHandler { parent::__construct( $modelId, $formats ); } + protected function getContentClass() { + return 'ScribuntoContent'; + } + /** * @param string $format * @return bool @@ -33,49 +37,6 @@ class ScribuntoContentHandler extends TextContentHandler { return parent::isSupportedFormat( $format ); } - /** - * Unserializes a ScribuntoContent object. - * - * @param $text string Serialized form of the content - * @param $format null|string The format used for serialization - * @return Content the ScribuntoContent object wrapping $text - */ - public function unserializeContent( $text, $format = null ) { - $this->checkFormat( $format ); - return new ScribuntoContent( $text ); - } - - /** - * Creates an empty ScribuntoContent object. - * - * @return Content - */ - public function makeEmptyContent() { - return new ScribuntoContent( '' ); - } - - /** - * Scripts themselves should be in English. - * - * @param Title $title - * @param Content $content - * @return Language wfGetLangObj( 'en' ) - */ - public function getPageLanguage( Title $title, Content $content = null ) { - return wfGetLangObj( 'en' ); - } - - /** - * Scripts themselves should be in English. - * - * @param Title $title - * @param Content $content - * @return Language wfGetLangObj( 'en' ) - */ - public function getPageViewLanguage( Title $title, Content $content = null ) { - return wfGetLangObj( 'en' ); - } - /** * Only allow this content handler to be used in the Module namespace * @param Title $title