- $nsForm = $this->namespaceForm( $namespace, $from, $to, $hideredirects );
- $out2 = Xml::openElement( 'table', array( 'class' => 'mw-allpages-table-form' ) ) .
- '<tr>
- <td>' .
- $nsForm .
- '</td>
- <td class="mw-allpages-nav">' .
- $this->getLanguage()->pipeList( $topLinks ) .
- '</td></tr></table>';
-
- $output->addHTML( $out2 . $out );
-
- if ( count( $bottomLinks ) ) {
- $output->addHTML(
- Html::element( 'hr' ) .
- Html::rawElement( 'div', array( 'class' => 'mw-allpages-nav' ),
- $this->getLanguage()->pipeList( $bottomLinks )
- )
+ $topOut = $this->namespaceForm( $namespace, $from, $to, $hideredirects );
+
+ if ( count( $navLinks ) ) {
+ // Add pagination links
+ $pagination = Html::rawElement( 'div',
+ array( 'class' => 'mw-allpages-nav' ),
+ $this->getLanguage()->pipeList( $navLinks )