Bugfis, making ?uselang=qqq an invalid language code, see
[lhc/web/wiklou.git] / includes / Licenses.php
index dd1308b..6398c88 100644 (file)
@@ -2,8 +2,7 @@
 /**
  * A License class for use on Special:Upload
  *
- * @package MediaWiki
- * @subpackage SpecialPage
+ * @ingroup SpecialPage
  *
  * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
  * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason
@@ -31,12 +30,12 @@ class Licenses {
        /**#@-*/
 
        /**
-        * Constrictor
+        * Constructor
         *
         * @param $str String: the string to build the licenses member from, will use
         *                    wfMsgForContent( 'licenses' ) if null (default: null)
         */
-       function Licenses( $str = null ) {
+       function __construct( $str = null ) {
                // PHP sucks, this should be possible in the constructor
                $this->msg = is_null( $str ) ? wfMsgForContent( 'licenses' ) : $str;
                $this->html = '';
@@ -122,7 +121,7 @@ class Licenses {
 
        function outputOption( $val, $attribs = null, $depth ) {
                $val = str_repeat( /* &nbsp */ "\xc2\xa0", $depth * 2 ) . $val;
-               return str_repeat( "\t", $depth ) . wfElement( 'option', $attribs, $val ) . "\n";
+               return str_repeat( "\t", $depth ) . Xml::element( 'option', $attribs, $val ) . "\n";
        }
 
        function msg( $str ) {
@@ -147,6 +146,9 @@ class Licenses {
        function getHtml() { return $this->html; }
 }
 
+/**
+ * A License class for use on Special:Upload (represents a single type of license).
+ */
 class License {
        /**
         * @var string
@@ -170,4 +172,3 @@ class License {
                $this->text = strrev( $text );
        }
 }
-?>