/** * @return string */ function getPagesSection() { $ti = wfEscapeWikiText( $this->title->getText() ); # Don't show articles section if there are none. $r = ''; # @todo FIXME: Here and in the other two sections: we don't need to bother # with this rigmarole if the entire category contents fit on one page # and have already been retrieved. We can just use $rescnt in that # case and save a query and some logic. $dbcnt = $this->cat->getPageCount() - $this->cat->getSubcatCount() - $this->cat->getFileCount(); $rescnt = count( $this->articles ); $countmsg = $this->getCountMessage( $rescnt, $dbcnt, 'article' ); if ( $rescnt > 0 ) { $r = "<div id=\"mw-pages\">\n"; $r .= '<h2>' . $this->msg( 'category_header', $ti )->text() . "</h2>\n"; $r .= $countmsg; $r .= $this->getSectionPagingLinks( 'page' ); $r .= $this->formatList( $this->articles, $this->articles_start_char ); $r .= $this->getSectionPagingLinks( 'page' ); $r .= "\n</div>"; } return $r; }