summaryrefslogtreecommitdiff
path: root/includes/content/CssContentHandler.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/content/CssContentHandler.php')
-rw-r--r--includes/content/CssContentHandler.php37
1 files changed, 6 insertions, 31 deletions
diff --git a/includes/content/CssContentHandler.php b/includes/content/CssContentHandler.php
index cb5a349d..b2a8676b 100644
--- a/includes/content/CssContentHandler.php
+++ b/includes/content/CssContentHandler.php
@@ -27,41 +27,16 @@
* @since 1.21
* @ingroup Content
*/
-class CssContentHandler extends TextContentHandler {
-
- public function __construct( $modelId = CONTENT_MODEL_CSS ) {
- parent::__construct( $modelId, array( CONTENT_FORMAT_CSS ) );
- }
-
- public function unserializeContent( $text, $format = null ) {
- $this->checkFormat( $format );
-
- return new CssContent( $text );
- }
-
- public function makeEmptyContent() {
- return new CssContent( '' );
- }
+class CssContentHandler extends CodeContentHandler {
/**
- * Returns the english language, because CSS is english, and should be handled as such.
- *
- * @return Language wfGetLangObj( 'en' )
- *
- * @see ContentHandler::getPageLanguage()
+ * @param string $modelId
*/
- public function getPageLanguage( Title $title, Content $content = null ) {
- return wfGetLangObj( 'en' );
+ public function __construct( $modelId = CONTENT_MODEL_CSS ) {
+ parent::__construct( $modelId, array( CONTENT_FORMAT_CSS ) );
}
- /**
- * Returns the english language, because CSS is english, and should be handled as such.
- *
- * @return Language wfGetLangObj( 'en' )
- *
- * @see ContentHandler::getPageViewLanguage()
- */
- public function getPageViewLanguage( Title $title, Content $content = null ) {
- return wfGetLangObj( 'en' );
+ protected function getContentClass() {
+ return 'CssContent';
}
}