Completed
Push — svgpagetools ( d7814e...a24eaf )
by Andreas
05:51
created

Conflict   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A minimumPermission() 0 8 2
A tplContent() 0 9 1
1
<?php
2
3
namespace dokuwiki\Action;
4
5
/**
6
 * Class Conflict
7
 *
8
 * Show the conflict resolution screen
9
 *
10
 * @package dokuwiki\Action
11
 */
12
class Conflict extends AbstractAction {
13
14
    /** @inheritdoc */
15
    public function minimumPermission() {
16
        global $INFO;
17
        if($INFO['exists']) {
18
            return AUTH_EDIT;
19
        } else {
20
            return AUTH_CREATE;
21
        }
22
    }
23
24
    public function tplContent() {
25
        global $PRE;
26
        global $TEXT;
27
        global $SUF;
28
        global $SUM;
29
30
        html_conflict(con($PRE, $TEXT, $SUF), $SUM);
31
        html_diff(con($PRE, $TEXT, $SUF), false);
32
    }
33
34
}
35