aboutsummaryrefslogtreecommitdiff
path: root/app/class/Controllerinfo.php
blob: 7b27ceaf6b039252006c7f2057df1701a002f874 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php

namespace Wcms;
use Michelf\MarkdownExtra;

class Controllerinfo extends Controller
{
    public function __construct($render){
        parent::__construct($render);
    }

    public function desktop()
    {
        if($this->user->iseditor()) {

            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]);

            }
        }
    }

}


?>