title and ->body * $nav_page A wiki page object with navigation, has ->body */ public function display_page(Page $page, WikiPage $wiki_page, ?WikiPage $nav_page=null) { global $user; if (is_null($nav_page)) { $nav_page = new WikiPage(); $nav_page->body = ""; } $tfe = new TextFormattingEvent($nav_page->body); send_event($tfe); // only the admin can edit the sidebar if ($user->can(Permissions::WIKI_ADMIN)) { $tfe->formatted .= "
(Edit)"; } // see if title is a category'd tag $title_html = html_escape($wiki_page->title); if (class_exists('TagCategories')) { $this->tagcategories = new TagCategories(); $tag_category_dict = $this->tagcategories->getKeyedDict(); $title_html = $this->tagcategories->getTagHtml($title_html, $tag_category_dict); } $page->set_title(html_escape($wiki_page->title)); $page->set_heading(html_escape($wiki_page->title)); $page->add_block(new NavBlock()); $page->add_block(new Block("Wiki Index", $tfe->formatted, "left", 20)); $page->add_block(new Block($title_html, $this->create_display_html($wiki_page))); } public function display_page_history(Page $page, string $title, array $history) { $html = "
{$rev} | {$row['date']} |
".make_form(make_link("wiki_admin/edit"))." | " : ""; if ($user->can(Permissions::WIKI_ADMIN)) { $edit .= "".make_form(make_link("wiki_admin/delete_revision"))." | ".make_form(make_link("wiki_admin/delete_all"))." | "; } $edit .= "