diff options
Diffstat (limited to 'app/class/Controllerinfo.php')
-rw-r--r-- | app/class/Controllerinfo.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/app/class/Controllerinfo.php b/app/class/Controllerinfo.php index af81caf..7b27cea 100644 --- a/app/class/Controllerinfo.php +++ b/app/class/Controllerinfo.php @@ -1,25 +1,31 @@ <?php namespace Wcms; +use Michelf\MarkdownExtra; class Controllerinfo extends Controller { - - public function __construct($render) { + public function __construct($render){ parent::__construct($render); } public function desktop() { if($this->user->iseditor()) { - $this->showtemplate('info', ['version' => getversion()]); - } - } + if(file_exists(Model::MAN_FILE)) { + $render = new Modelrender($this->router); + $htmlman = file_get_contents(Model::MAN_FILE); + $htmlman = $render->rendermanual($htmlman); - + $summary = $render->sumparser(2, 4); + $this->showtemplate('info', ['version' => getversion(), 'manual' => $htmlman, 'summary' => $summary]); + + } + } + } } |