Implement User::isUserActive(). Potentially very useful for bugs 13225 and 13585...
[lhc/web/wiklou.git] / includes / Licenses.php
index a2cbcc9..e76ac23 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
@@ -12,7 +11,7 @@
 
 class Licenses {
        /**#@+
-        * @access private
+        * @private
         */
        /**
         * @var string
@@ -31,12 +30,12 @@ class Licenses {
        /**#@-*/
 
        /**
-        * Constrictor
+        * Constructor
         *
-        * @param string $str The string to build the licenses member from, will use
+        * @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 = '';
@@ -47,7 +46,7 @@ class Licenses {
        }
 
        /**#@+
-        * @access private
+        * @private
         */
        function makeLicenses() {
                $levels = array();
@@ -63,12 +62,14 @@ class Licenses {
                                        $obj = new License( $line );
                                        $this->stackItem( $this->licenses, $levels, $obj );
                                } else {
-                                       if ( $level < count( $levels ) )
+                                       if ( $level < count( $levels ) ) {
                                                $levels = array_slice( $levels, 0, $level );
-                                       if ( $level == count( $levels ) )
+                                       }
+                                       if ( $level == count( $levels ) ) {
                                                $levels[$level - 1] = $line;
-                                       else if ( $level > count( $levels ) )
+                                       } else if ( $level > count( $levels ) ) {
                                                $levels[] = $line;
+                                       }
                                }
                        }
                }
@@ -145,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
@@ -159,7 +163,7 @@ class License {
        /**
         * Constructor
         *
-        * @param string $str
+        * @param $str String: license name??
         */
        function License( $str ) {
                list( $text, $template ) = explode( '|', strrev( $str ), 2 );
@@ -168,4 +172,3 @@ class License {
                $this->text = strrev( $text );
        }
 }
-?>