From d67f5736dfbec2b769e98dd17f34137b9feec1fc Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Tue, 25 Oct 2011 22:52:38 +0000 Subject: improved wiki (TOC and moderator box) --- h-source/Application/Include/wikiFormatting.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'h-source/Application/Include/wikiFormatting.php') diff --git a/h-source/Application/Include/wikiFormatting.php b/h-source/Application/Include/wikiFormatting.php index 40b7f34..0bcc932 100644 --- a/h-source/Application/Include/wikiFormatting.php +++ b/h-source/Application/Include/wikiFormatting.php @@ -82,11 +82,11 @@ function decodeWikiText($string) if ($decodeAnotherTime and $decodeCounter<=30) { - return decodeWikiText(Toc::render().Tabs::render().$string); + return decodeWikiText(Tabs::render().$string); } else { - return Toc::render().Tabs::render().$string; + return Tabs::render().$string; } } @@ -180,14 +180,14 @@ function createNode($match,$hnodeTag,$htmlTagBegin,$htmlTagEng) } else { +// $decodeAnotherTime = false; return $htmlTagBegin.$match[2].$htmlTagEng; } } function createToc($match) { - Toc::create(); - return null; + return Toc::render(); } //table of contents @@ -199,7 +199,7 @@ class Toc private static $html = null; - public function create() + public function render() { $c=0; foreach (self::$links as $link) @@ -255,12 +255,7 @@ class Toc $res[] = ""; } self::$links = array(); - self::$html = implode('',$res); - } - - public function render() - { - echo self::$html; + return implode('',$res); } } -- cgit v1.2.3