aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Include/wikiFormatting.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-10-25 22:52:38 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-10-25 22:52:38 +0000
commitd67f5736dfbec2b769e98dd17f34137b9feec1fc (patch)
treebfb72d575c958957f3e722de05068b664d4fbe3f /h-source/Application/Include/wikiFormatting.php
parent94a0a341180376096f8be03261051ccd4f5fe083 (diff)
improved wiki (TOC and moderator box)
Diffstat (limited to 'h-source/Application/Include/wikiFormatting.php')
-rw-r--r--h-source/Application/Include/wikiFormatting.php17
1 files changed, 6 insertions, 11 deletions
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[] = "</ul></div>";
}
self::$links = array();
- self::$html = implode('',$res);
- }
-
- public function render()
- {
- echo self::$html;
+ return implode('',$res);
}
}