X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialPrefixindex.php;h=bc5dfd0805e4224256e31a648c906abc4a7fda0d;hb=cca0d6e6b4c59a19d7f9b48e0d1af80cfb4d95d9;hp=2e67e2b54c294eed55ce79e7707f1d1785d1356d;hpb=5141b5753b2add7b9f66baa8852f11f1648a9ac3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialPrefixindex.php b/includes/specials/SpecialPrefixindex.php index 2e67e2b54c..bc5dfd0805 100644 --- a/includes/specials/SpecialPrefixindex.php +++ b/includes/specials/SpecialPrefixindex.php @@ -36,9 +36,6 @@ class SpecialPrefixindex extends SpecialAllPages { protected $hideRedirects = false; - // number of columns in output table - protected $columns = 3; - // Inherit $maxPerPage function __construct() { @@ -66,7 +63,6 @@ class SpecialPrefixindex extends SpecialAllPages { $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( @@ -102,7 +98,10 @@ class SpecialPrefixindex extends SpecialAllPages { */ protected function namespacePrefixForm( $namespace = NS_MAIN, $from = '' ) { $out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) ); - $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $this->getConfig()->get( 'Script' ) ) ); + $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() ); @@ -177,7 +176,7 @@ class SpecialPrefixindex extends SpecialAllPages { 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 ); @@ -202,11 +201,12 @@ class SpecialPrefixindex extends SpecialAllPages { ) ); - ### @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() ) ) { @@ -227,21 +227,13 @@ class SpecialPrefixindex extends SpecialAllPages { } else { $link = '[[' . htmlspecialchars( $s->page_title ) . ']]'; } - if ( $n % $this->columns == 0 ) { - $out .= ''; - } - $out .= "$link"; + + $out .= "
  • $link
  • \n"; $n++; - if ( $n % $this->columns == 0 ) { - $out .= ''; - } - } - if ( $n % $this->columns != 0 ) { - $out .= ''; } - - $out .= Xml::closeElement( 'table' ); + $out .= Html::closeElement( 'ul' ); + $out .= Html::closeElement( 'div' ); } else { $out = ''; } @@ -266,7 +258,6 @@ class SpecialPrefixindex extends SpecialAllPages { 'prefix' => $prefix, 'hideredirects' => $this->hideRedirects, 'stripprefix' => $this->stripPrefix, - 'columns' => $this->columns, ); if ( $namespace || $prefix == '' ) {