/** * show child entries for the passed entry * * @param string $parent_id id of entry to get the childs for */ function childs_action($parent_id) { $this->set_layout(null); // if the parent-id is a category-id, get all areas for this category if ($cat = ForumCat::get($parent_id)) { ForumPerm::check('admin', $cat['seminar_id']); // check the perms in the categories seminar $this->entries = ForumEntry::parseEntries(ForumCat::getAreas($parent_id)); } else { ForumPerm::check('admin', $this->getId(), $parent_id); $entries = ForumEntry::getList('flat', $parent_id); $this->entries = $entries['list']; } }
private function getAreas($category_id, $offset = 0, $limit = 10) { $offset = (int) $offset; $limit = (int) $limit; $areas = array(); foreach (\ForumCat::getAreas($category_id, $offset, $limit) as $area) { $url = $this->urlf('/forum_entry/%s', array(htmlReady($area['topic_id']))); $areas[$url] = $this->convertEntry($area); } return $areas; }