xref: /dokuwiki/inc/Action/Conflict.php (revision 6467f2ce9c6374fa0d04afda5103e72c4b2702e6)
1<?php
2
3namespace dokuwiki\Action;
4
5use dokuwiki\Ui;
6
7/**
8 * Class Conflict
9 *
10 * Show the conflict resolution screen
11 *
12 * @package dokuwiki\Action
13 */
14class Conflict extends AbstractAction
15{
16    /** @inheritdoc */
17    public function minimumPermission()
18    {
19        global $INFO;
20        if ($INFO['exists']) {
21            return AUTH_EDIT;
22        } else {
23            return AUTH_CREATE;
24        }
25    }
26
27    public function tplContent()
28    {
29        global $PRE;
30        global $TEXT;
31        global $SUF;
32        global $SUM;
33
34        (new Ui\Conflict)->show(con($PRE, $TEXT, $SUF), $SUM);
35        html_diff(con($PRE, $TEXT, $SUF), false);
36    }
37
38}
39