Mwalker has submitted this change and it was merged.

Change subject: Special:Version: Treat AUTHORS.txt and CREDITS.txt as text, not 
wikitext
......................................................................


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
---
M includes/specials/SpecialVersion.php
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Jforrester: Looks good to me, but someone else must approve
  Mwalker: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialVersion.php 
b/includes/specials/SpecialVersion.php
index c38b009..870fa11 100644
--- a/includes/specials/SpecialVersion.php
+++ b/includes/specials/SpecialVersion.php
@@ -86,6 +86,9 @@
                                        $file = $this->getExtAuthorsFileName( 
dirname( $extNode['path'] ) );
                                        if ( $file ) {
                                                $wikiText = file_get_contents( 
$file );
+                                               if ( substr( $file, -4 ) === 
'.txt' ) {
+                                                       $wikiText = 
Html::element( 'pre', array(), $wikiText );
+                                               }
                                        }
                                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/116515
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id95852ab9836fb284becd7e251374f672b69515f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Mwalker <mwal...@wikimedia.org>
Gerrit-Reviewer: Parent5446 <tylerro...@gmail.com>
Gerrit-Reviewer: Yuvipanda <yuvipa...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to