/** * @return string */ function getImageSection() { $r = ''; $rescnt = $this->showGallery ? $this->gallery->count() : count($this->imgsNoGallery); if ($rescnt > 0) { $dbcnt = $this->cat->getFileCount(); $countmsg = $this->getCountMessage($rescnt, $dbcnt, 'file'); $r .= "<div id=\"mw-category-media\">\n"; $r .= '<h2>' . $this->msg('category-media-header', wfEscapeWikiText($this->title->getText()))->text() . "</h2>\n"; $r .= $countmsg; $r .= $this->getSectionPagingLinks('file'); if ($this->showGallery) { $r .= $this->gallery->toHTML(); } else { $r .= $this->formatList($this->imgsNoGallery, $this->imgsNoGallery_start_char); } $r .= $this->getSectionPagingLinks('file'); $r .= "\n</div>"; } return $r; }
/** * @return string */ function getImageSection() { $name = $this->getPrettyPageNameHtml(); $r = ''; $rescnt = $this->showGallery ? $this->gallery->count() : count($this->imgsNoGallery); $dbcnt = $this->cat->getFileCount(); // This function should be called even if the result isn't used, it has side-effects $countmsg = $this->getCountMessage($rescnt, $dbcnt, 'file'); if ($rescnt > 0) { $r .= "<div id=\"mw-category-media\">\n"; $r .= '<h2>' . $this->msg('category-media-header')->rawParams($name)->parse() . "</h2>\n"; $r .= $countmsg; $r .= $this->getSectionPagingLinks('file'); if ($this->showGallery) { $r .= $this->gallery->toHTML(); } else { $r .= $this->formatList($this->imgsNoGallery, $this->imgsNoGallery_start_char); } $r .= $this->getSectionPagingLinks('file'); $r .= "\n</div>"; } return $r; }