isNavigationBarShown() ) { return ''; } if ( isset( $this->mNavigationBar ) ) { return $this->mNavigationBar; } $linkTexts = array( 'prev' => $this->msg( 'prevn' )->numParams( $this->mLimit )->escaped(), 'next' => $this->msg( 'nextn' )->numParams( $this->mLimit )->escaped(), 'first' => $this->msg( 'page_first' )->escaped(), 'last' => $this->msg( 'page_last' )->escaped() ); $lang = $this->getLanguage(); $pagingLinks = $this->getPagingLinks( $linkTexts ); $limitLinks = $this->getLimitLinks(); $limits = $lang->pipeList( $limitLinks ); $this->mNavigationBar = $this->msg( 'parentheses' )->rawParams( $lang->pipeList( array( $pagingLinks['first'], $pagingLinks['last'] ) ) )->escaped() . " " . $this->msg( 'viewprevnext' )->rawParams( $pagingLinks['prev'], $pagingLinks['next'], $limits )->escaped(); if ( !is_array( $this->getIndexField() ) ) { # Early return to avoid undue nesting return $this->mNavigationBar; } $extra = ''; $first = true; $msgs = $this->getOrderTypeMessages(); foreach ( array_keys( $msgs ) as $order ) { if ( $first ) { $first = false; } else { $extra .= $this->msg( 'pipe-separator' )->escaped(); } if ( $order == $this->mOrderType ) { $extra .= $this->msg( $msgs[$order] )->escaped(); } else { $extra .= $this->makeLink( $this->msg( $msgs[$order] )->escaped(), array( 'order' => $order ) ); } } if ( $extra !== '' ) { $extra = ' ' . $this->msg( 'parentheses' )->rawParams( $extra )->escaped(); $this->mNavigationBar .= $extra; } return $this->mNavigationBar; } /** * If this supports multiple order type messages, give the message key for * enabling each one in getNavigationBar. The return type is an associative * array whose keys must exactly match the keys of the array returned * by getIndexField(), and whose values are message keys. * * @return array */ protected function getOrderTypeMessages() { return null; } }