From: daniel Date: Wed, 25 Apr 2012 18:45:32 +0000 (+0200) Subject: use text/x-wiki instead of application/x-wiki, as per brions comment on wikitech-l X-Git-Tag: 1.31.0-rc.0~22097^2^2~196 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/modifier.php?a=commitdiff_plain;h=2b740d448a058215245e2b3ab4193acb54016b2f;p=lhc%2Fweb%2Fwiklou.git use text/x-wiki instead of application/x-wiki, as per brions comment on wikitech-l --- diff --git a/includes/ContentHandler.php b/includes/ContentHandler.php index d434a216fd..145749f404 100644 --- a/includes/ContentHandler.php +++ b/includes/ContentHandler.php @@ -711,7 +711,7 @@ abstract class TextContentHandler extends ContentHandler { class WikitextContentHandler extends TextContentHandler { public function __construct( $modelName = CONTENT_MODEL_WIKITEXT ) { - parent::__construct( $modelName, array( 'application/x-wiki' ) ); + parent::__construct( $modelName, array( 'text/x-wiki' ) ); } public function unserializeContent( $text, $format = null ) { diff --git a/tests/phpunit/includes/ContentHandlerTest.php b/tests/phpunit/includes/ContentHandlerTest.php index 704ad717f3..f63d5def07 100644 --- a/tests/phpunit/includes/ContentHandlerTest.php +++ b/tests/phpunit/includes/ContentHandlerTest.php @@ -106,7 +106,7 @@ class ContentHandlerTest extends MediaWikiTestCase { array( 'hallo', 'MediaWiki:Test.js', null, null, CONTENT_MODEL_JAVASCRIPT, 'hallo', false ), array( serialize('hallo'), 'Dummy:Test', null, null, 'DUMMY', 'hallo', false ), - array( 'hallo', 'Test', null, 'application/x-wiki', CONTENT_MODEL_WIKITEXT, 'hallo', false ), + array( 'hallo', 'Test', null, 'text/x-wiki', CONTENT_MODEL_WIKITEXT, 'hallo', false ), array( 'hallo', 'MediaWiki:Test.js', null, 'text/javascript', CONTENT_MODEL_JAVASCRIPT, 'hallo', false ), array( serialize('hallo'), 'Dummy:Test', null, 'dummy', 'DUMMY', 'hallo', false ), diff --git a/tests/phpunit/includes/WikitextContentHandlerTest.php b/tests/phpunit/includes/WikitextContentHandlerTest.php index 7edb642a3c..c6b899f3bd 100644 --- a/tests/phpunit/includes/WikitextContentHandlerTest.php +++ b/tests/phpunit/includes/WikitextContentHandlerTest.php @@ -18,7 +18,7 @@ class WikitextContentHandlerTest extends MediaWikiTestCase { $content = new WikitextContent( 'hello world' ); $this->assertEquals( 'hello world', $this->handler->serializeContent( $content ) ); - $this->assertEquals( 'hello world', $this->handler->serializeContent( $content, 'application/x-wiki' ) ); + $this->assertEquals( 'hello world', $this->handler->serializeContent( $content, 'text/x-wiki' ) ); try { $this->handler->serializeContent( $content, 'dummy/foo' ); @@ -32,7 +32,7 @@ class WikitextContentHandlerTest extends MediaWikiTestCase { $content = $this->handler->unserializeContent( 'hello world' ); $this->assertEquals( 'hello world', $content->getNativeData() ); - $content = $this->handler->unserializeContent( 'hello world', 'application/x-wiki' ); + $content = $this->handler->unserializeContent( 'hello world', 'text/x-wiki' ); $this->assertEquals( 'hello world', $content->getNativeData() ); try { @@ -53,7 +53,7 @@ class WikitextContentHandlerTest extends MediaWikiTestCase { public function dataIsSupportedFormat( ) { return array( array( null, true ), - array( 'application/x-wiki', true ), + array( 'text/x-wiki', true ), array( 'dummy/foo', false ), ); }