* Reverting the last commit, if you just want to use a message from the user
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Fri, 30 Dec 2005 17:07:47 +0000 (17:07 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Fri, 30 Dec 2005 17:07:47 +0000 (17:07 +0000)
  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

index 5429b4c..36b5a7e 100644 (file)
@@ -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 == '&lt;'.$t.'&gt;' )
-                               $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();