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.
*/
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();