Completed
Pull Request — master (#2413)
by Michael
17:27 queued 12:53
created

Preview::savedraft()   B

Complexity

Conditions 4
Paths 4

Size

Total Lines 26
Code Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 19
nc 4
nop 0
dl 0
loc 26
rs 8.5806
c 0
b 0
f 0
1
<?php
2
3
namespace dokuwiki\Action;
4
5
/**
6
 * Class Preview
7
 *
8
 * preview during editing
9
 *
10
 * @package dokuwiki\Action
11
 */
12
class Preview extends Edit {
13
14
    /** @inheritdoc */
15
    public function preProcess() {
16
        header('X-XSS-Protection: 0');
17
        saveDraft();
18
        parent::preProcess();
19
    }
20
21
    /** @inheritdoc */
22
    public function tplContent() {
23
        global $TEXT;
24
        html_edit();
25
        html_show($TEXT);
26
    }
27
}
28