This commit is contained in:
parent
caf9e32c85
commit
48bab092c5
@ -8,9 +8,14 @@
|
||||
$indexes = explode('.', $v['index']);
|
||||
$level = count($indexes);
|
||||
$e = explode(' - ', $v['name']);
|
||||
$file = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'docs' . DIRECTORY_SEPARATOR . $v['name'] . '.php';
|
||||
|
||||
print '<div class=level' . $level . '><font class=level' . $level . '> '. $v['index'] . '. <a href=documentation2.php?chapter='
|
||||
. urlencode($v['name']) . ">" . end($e) ."</a></font></div>";
|
||||
. urlencode($v['name']) . ">" . end($e) ."</a></font>";
|
||||
if ( ! file_exists($file)) {
|
||||
//print "<font color='red'>[code]</font>";
|
||||
}
|
||||
print "</div>";
|
||||
}
|
||||
} else {
|
||||
|
||||
|
@ -76,13 +76,16 @@ class DocTool
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public function renderBlock($name) {
|
||||
public function renderBlock($name)
|
||||
{
|
||||
|
||||
if (file_exists("docs/$name.php")) {
|
||||
$c = file_get_contents("docs/$name.php");
|
||||
|
||||
if (substr($c, 0, 5) == "<?php") {
|
||||
include("docs/$name.php");
|
||||
} elseif (strpos($c, '<br \>') !== false) {
|
||||
print $c;
|
||||
} else {
|
||||
print $this->wiki->transform($c) . "<br><br>";
|
||||
}
|
||||
@ -93,7 +96,8 @@ class DocTool
|
||||
$this->renderCode($c);
|
||||
}
|
||||
}
|
||||
public function renderCode($code = null) {
|
||||
public function renderCode($code = null)
|
||||
{
|
||||
if( ! empty($code)) {
|
||||
|
||||
$this->highlighter->loadString($code);
|
||||
|
Loading…
x
Reference in New Issue
Block a user