*
* @ingroup SpecialPage
*/
-class SpecialPrefixindex extends SpecialAllpages {
+class SpecialPrefixindex extends SpecialAllPages {
/**
* Whether to remove the searched prefix from the displayed link. Useful
protected $hideRedirects = false;
- // number of columns in output table
- protected $columns = 3;
-
// Inherit $maxPerPage
function __construct() {
$namespace = (int)$ns; // if no namespace given, use 0 (NS_MAIN).
$this->hideRedirects = $request->getBool( 'hideredirects', $this->hideRedirects );
$this->stripPrefix = $request->getBool( 'stripprefix', $this->stripPrefix );
- $this->columns = $request->getInt( 'columns', $this->columns );
$namespaces = $wgContLang->getNamespaces();
$out->setPageTitle(
* @return string
*/
protected function namespacePrefixForm( $namespace = NS_MAIN, $from = '' ) {
- global $wgScript;
-
$out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) );
- $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
+ $out .= Xml::openElement(
+ 'form',
+ array( 'method' => 'get', 'action' => $this->getConfig()->get( 'Script' ) )
+ );
$out .= Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() );
$out .= Xml::openElement( 'fieldset' );
$out .= Xml::element( 'legend', null, $this->msg( 'allpages' )->text() );
list( $namespace, $prefixKey, $prefix ) = $prefixList;
list( /* $fromNS */, $fromKey, ) = $fromList;
- ### @todo FIXME: Should complain if $fromNs != $namespace
+ # ## @todo FIXME: Should complain if $fromNs != $namespace
$dbr = wfGetDB( DB_SLAVE );
)
);
- ### @todo FIXME: Side link to previous
+ # ## @todo FIXME: Side link to previous
$n = 0;
if ( $res->numRows() > 0 ) {
- $out = Xml::openElement( 'table', array( 'class' => 'mw-prefixindex-list-table' ) );
+ $out = Html::openElement( 'div', array( 'class' => 'mw-prefixindex-body' ) );
+ $out .= Html::openElement( 'ul', array( 'class' => 'mw-prefixindex-list' ) );
$prefixLength = strlen( $prefix );
while ( ( $n < $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
} else {
$link = '[[' . htmlspecialchars( $s->page_title ) . ']]';
}
- if ( $n % $this->columns == 0 ) {
- $out .= '<tr>';
- }
- $out .= "<td>$link</td>";
+
+ $out .= "<li> $link </li>\n";
$n++;
- if ( $n % $this->columns == 0 ) {
- $out .= '</tr>';
- }
- }
- if ( $n % $this->columns != 0 ) {
- $out .= '</tr>';
}
-
- $out .= Xml::closeElement( 'table' );
+ $out .= Html::closeElement( 'ul' );
+ $out .= Html::closeElement( 'div' );
} else {
$out = '';
}
'prefix' => $prefix,
'hideredirects' => $this->hideRedirects,
'stripprefix' => $this->stripPrefix,
- 'columns' => $this->columns,
);
if ( $namespace || $prefix == '' ) {