From 5960b303470f42f15245f0bd597f7ce165ce77e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Fri, 30 Dec 2005 17:07:47 +0000 Subject: [PATCH] * Reverting the last commit, if you just want to use a message from the user language if it exists use wfMsg() instead of wfMsgForContent(), don't rewrite the entire message selection code when we have libraries to handle that, furthermore, this *should* use the content language by default, since it's only in rare cases, such as the commons, when you want the opposite, this should be overriden via a configuration ($wgForceUIMsgAsContentMsg) there instead of changing the main code. --- includes/Licenses.php | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/includes/Licenses.php b/includes/Licenses.php index 5429b4c079..36b5a7e846 100644 --- a/includes/Licenses.php +++ b/includes/Licenses.php @@ -38,20 +38,7 @@ class Licenses { */ function Licenses( $str = null ) { // PHP sucks, this should be possible in the constructor - - global $wgLanguageCode ; - if ( is_null( $str ) ) { - # Try for language-localized license list; if not, try the deault - $t = 'licenses/'.$wgLanguageCode ; - $s = wfMsgForContent( $t ) ; - if ( $s == '<'.$t.'>' ) - $t = wfMsgForContent( 'licenses' ) ; - $this->msg = $s ; - } else { - # Use passed string - $this->msg = $str ; - } -# $this->msg = is_null( $str ) ? wfMsgForContent( 'licenses' ) : $str; # Old code, do not use! + $this->msg = is_null( $str ) ? wfMsgForContent( 'licenses' ) : $str; $this->html = ''; $this->makeLicenses(); -- 2.20.1