/**
* 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
class Licenses {
/**#@+
- * @access private
+ * @private
*/
/**
* @var string
/**#@-*/
/**
- * 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 = '';
}
/**#@+
- * @access private
+ * @private
*/
function makeLicenses() {
$levels = array();
$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;
+ }
}
}
}
function getHtml() { return $this->html; }
}
+/**
+ * A License class for use on Special:Upload (represents a single type of license).
+ */
class License {
/**
* @var string
/**
* Constructor
*
- * @param string $str
+ * @param $str String: license name??
*/
function License( $str ) {
list( $text, $template ) = explode( '|', strrev( $str ), 2 );
$this->text = strrev( $text );
}
}
-?>