From: Ævar Arnfjörð Bjarmason Date: Fri, 30 Dec 2005 17:07:47 +0000 (+0000) Subject: * Reverting the last commit, if you just want to use a message from the user X-Git-Tag: 1.6.0~839 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=5960b303470f42f15245f0bd597f7ce165ce77e6;p=lhc%2Fweb%2Fwiklou.git * 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. --- 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();