text = $text; } /** * Show a wiki page * * @author Andreas Gohr * * @triggers HTML_SHOWREV_OUTPUT * @return void */ public function show() { global $ID; global $REV; global $HIGH; global $INFO; global $DATE_AT; //disable section editing for old revisions or in preview if ($this->text !== null || $REV) { $secedit = false; } else { $secedit = true; } if ($this->text !== null) { //PreviewHeader echo '
'; // print intro for preview echo p_locale_xhtml('preview'); echo '
'; $html = html_secedit(p_render('xhtml', p_get_instructions($this->text), $info), $secedit); if ($INFO['prependTOC']) $html = tpl_toc(true) . $html; echo $html; echo '
'; echo '
'; } else { if ($REV || $DATE_AT) { // print intro for old revisions $data = array('rev' => &$REV, 'date_at' => &$DATE_AT); Event::createAndTrigger('HTML_SHOWREV_OUTPUT', $data, [$this, 'showrev']); } $html = p_wiki_xhtml($ID, $REV, true, $DATE_AT); $html = html_secedit($html, $secedit); if ($INFO['prependTOC']) $html = tpl_toc(true) . $html; $html = html_hilight($html, $HIGH); echo $html; } } /** * Show a revision warning * * @author Szymon Olewniczak */ public function showrev() { print p_locale_xhtml('showrev'); } }