/**
* Constructor
*
- * @param string $name name of the special page, as seen in links and URLs (default: 'Allpages')
+ * @param string $name Name of the special page, as seen in links and URLs (default: 'Allpages')
*/
function __construct( $name = 'Allpages' ) {
parent::__construct( $name );
/**
* Entry point : initialise variables and call subfunctions.
*
- * @param string $par becomes "FOO" when called like Special:Allpages/FOO (default null)
+ * @param string $par Becomes "FOO" when called like Special:Allpages/FOO (default null)
*/
function execute( $par ) {
$request = $this->getRequest();
);
if ( $res->numRows() > 0 ) {
- $out = Xml::openElement( 'table', array( 'class' => 'mw-allpages-table-chunk' ) );
+ $out = Xml::openElement( 'ul', array( 'class' => 'mw-allpages-chunk' ) );
while ( ( $n < $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
$t = Title::newFromRow( $s );
if ( $t ) {
- $link = ( $s->page_is_redirect ? '<div class="allpagesredirect">' : '' ) .
+ $out .= '<li' .
+ ( $s->page_is_redirect ? ' class="allpagesredirect"' : '' ) .
+ '>' .
Linker::link( $t ) .
- ( $s->page_is_redirect ? '</div>' : '' );
+ "</li>\n";
} else {
- $link = '[[' . htmlspecialchars( $s->page_title ) . ']]';
+ $out .= '<li>[[' . htmlspecialchars( $s->page_title ) . "]]</li>\n";
}
-
- if ( $n % 3 == 0 ) {
- $out .= '<tr>';
- }
-
- $out .= "<td style=\"width:33%\">$link</td>";
- $n++;
- if ( $n % 3 == 0 ) {
- $out .= "</tr>\n";
- }
- }
-
- if ( ( $n % 3 ) != 0 ) {
- $out .= "</tr>\n";
}
- $out .= Xml::closeElement( 'table' );
+ $out .= Xml::closeElement( 'ul' );
} else {
$out = '';
}