Example #1
0
 /**
  * @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;
 }