From: Brad Jorsch Date: Mon, 3 Mar 2014 17:53:55 +0000 (-0500) Subject: Special:Version: Treat AUTHORS.txt and CREDITS.txt as text, not wikitext X-Git-Tag: 1.31.0-rc.0~16766 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=0fd843a09c299d85d0f2c47013f8dbc41b7503a8;p=lhc%2Fweb%2Fwiklou.git Special:Version: Treat AUTHORS.txt and CREDITS.txt as text, not wikitext A review of existing extensions in git reveals that 3 of the 5 extensions that have a non-wikitext authors/credits file have this file named AUTHORS.txt, while none of the 8 that have wikitext authors/credits have a .txt extension. So let's fix the 2 that have non-wikitext as "AUTHORS" and do this for the benefit of the other three that presumably don't want to use wikitext in authors/credits. Bug: 62153 Change-Id: Id95852ab9836fb284becd7e251374f672b69515f --- diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index c38b0099be..870fa1177a 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -86,6 +86,9 @@ class SpecialVersion extends SpecialPage { $file = $this->getExtAuthorsFileName( dirname( $extNode['path'] ) ); if ( $file ) { $wikiText = file_get_contents( $file ); + if ( substr( $file, -4 ) === '.txt' ) { + $wikiText = Html::element( 'pre', array(), $wikiText ); + } } }