Conditions | 4 |
Paths | 3 |
Total Lines | 20 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | protected function main() |
||
23 | { |
||
24 | $path = $this->getSiteConfiguration()->getPrivacyStatementPath(); |
||
25 | |||
26 | if ($path == null || !file_exists($path)) { |
||
27 | if (!headers_sent()) { |
||
28 | header('HTTP/1.1 404 Not Found'); |
||
29 | } |
||
30 | |||
31 | $this->skipAlerts(); |
||
32 | $this->setTemplate('404.tpl'); |
||
33 | return; |
||
34 | } |
||
35 | |||
36 | $markdown = file_get_contents($path); |
||
37 | |||
38 | $renderer = new MarkdownRenderingHelper(); |
||
39 | $this->assign('content', $renderer->doRender($markdown)); |
||
40 | |||
41 | $this->setTemplate($this->templatePath()); |
||
42 | } |
||
43 | } |