From 0fd843a09c299d85d0f2c47013f8dbc41b7503a8 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Mon, 3 Mar 2014 12:53:55 -0500 Subject: [PATCH] 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 --- includes/specials/SpecialVersion.php | 3 +++ 1 file changed, 3 insertions(+) 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 ); + } } } -- 2.20.1