From: daniel Date: Wed, 25 Apr 2012 16:12:11 +0000 (+0200) Subject: use application/x-wiki, not application/x-wikitext X-Git-Tag: 1.31.0-rc.0~22097^2^2~203 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/supprimer.php?a=commitdiff_plain;h=e1d02919522afed523178194f22a1bdb791091e9;p=lhc%2Fweb%2Fwiklou.git use application/x-wiki, not application/x-wikitext --- diff --git a/includes/ContentHandler.php b/includes/ContentHandler.php index 438f78f80f..9c8d15b9ff 100644 --- a/includes/ContentHandler.php +++ b/includes/ContentHandler.php @@ -705,7 +705,7 @@ abstract class TextContentHandler extends ContentHandler { class WikitextContentHandler extends TextContentHandler { public function __construct( $modelName = CONTENT_MODEL_WIKITEXT ) { - parent::__construct( $modelName, array( 'application/x-wikitext' ) ); #FIXME: which mime type? + parent::__construct( $modelName, array( 'application/x-wiki' ) ); } public function unserializeContent( $text, $format = null ) { diff --git a/tests/phpunit/includes/ContentHandlerTest.php b/tests/phpunit/includes/ContentHandlerTest.php index 6deed47d6b..038842f2a7 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-wikitext', CONTENT_MODEL_WIKITEXT, 'hallo', false ), + array( 'hallo', 'Test', null, 'application/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/RevisionTest.php b/tests/phpunit/includes/RevisionTest.php index e9243d47d5..14e2504ab6 100644 --- a/tests/phpunit/includes/RevisionTest.php +++ b/tests/phpunit/includes/RevisionTest.php @@ -190,7 +190,7 @@ class RevisionTest extends MediaWikiTestCase { function dataGetContentFormat() { return array( - array( 'hello world', 'Hello', null, null, 'application/x-wikitext' ), + array( 'hello world', 'Hello', null, null, 'application/x-wiki' ), array( 'hello world', 'Hello', CONTENT_MODEL_CSS, null, 'text/css' ), array( 'hello world', 'User:hello/there.css', null, null, 'text/css' ), array( serialize('hello world'), 'Dummy:Hello', null, null, 'dummy' ), diff --git a/tests/phpunit/includes/WikitextContentHandlerTest.php b/tests/phpunit/includes/WikitextContentHandlerTest.php index 1f073d2de4..53c968f392 100644 --- a/tests/phpunit/includes/WikitextContentHandlerTest.php +++ b/tests/phpunit/includes/WikitextContentHandlerTest.php @@ -15,7 +15,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-wikitext' ) ); + $this->assertEquals( 'hello world', $this->handler->serializeContent( $content, 'application/x-wiki' ) ); try { $this->handler->serializeContent( $content, 'dummy/foo' ); @@ -29,7 +29,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-wikitext' ); + $content = $this->handler->unserializeContent( 'hello world', 'application/x-wiki' ); $this->assertEquals( 'hello world', $content->getNativeData() ); try { @@ -50,7 +50,7 @@ class WikitextContentHandlerTest extends MediaWikiTestCase { public function dataIsSupportedFormat( ) { return array( array( null, true ), - array( 'application/x-wikitext', true ), + array( 'application/x-wiki', true ), array( 'dummy/foo', false ), ); }