/**
  * Get pages for list.
  */
 function getPages()
 {
     include_once "./Modules/Wiki/classes/class.ilWikiPage.php";
     $pages = array();
     $this->setDefaultOrderField("title");
     switch ($this->pg_list_mode) {
         case IL_WIKI_WHAT_LINKS_HERE:
             $pages = ilWikiPage::getLinksToPage($this->wiki_id, $this->page_id);
             break;
         case IL_WIKI_ALL_PAGES:
             $pages = ilWikiPage::getAllPages($this->wiki_id);
             break;
         case IL_WIKI_NEW_PAGES:
             $this->setDefaultOrderField("created");
             $this->setDefaultOrderDirection("desc");
             $pages = ilWikiPage::getNewPages($this->wiki_id);
             break;
         case IL_WIKI_POPULAR_PAGES:
             $this->setDefaultOrderField("cnt");
             $this->setDefaultOrderDirection("desc");
             $pages = ilWikiPage::getPopularPages($this->wiki_id);
             break;
         case IL_WIKI_ORPHANED_PAGES:
             $pages = ilWikiPage::getOrphanedPages($this->wiki_id);
             break;
     }
     if ($pages) {
         // enable sorting
         include_once "./Services/User/classes/class.ilUserUtil.php";
         foreach (array_keys($pages) as $idx) {
             $pages[$idx]["user_sort"] = ilUserUtil::getNamePresentation($pages[$idx]["user"], false, false);
         }
     }
     $this->setData($pages);
 }