xref: /dokuwiki/inc/Action/Diff.php (revision bb2b4f19a4631801540ac170d49d8946e4ebd454)
164ab5140SAndreas Gohr<?php
264ab5140SAndreas Gohr
364ab5140SAndreas Gohrnamespace dokuwiki\Action;
464ab5140SAndreas Gohr
5ab583a1bSAndreas Gohr/**
6ab583a1bSAndreas Gohr * Class Diff
7ab583a1bSAndreas Gohr *
8ab583a1bSAndreas Gohr * Show the differences between two revisions
9ab583a1bSAndreas Gohr *
10ab583a1bSAndreas Gohr * @package dokuwiki\Action
11ab583a1bSAndreas Gohr */
1264ab5140SAndreas Gohrclass Diff extends AbstractAction {
1364ab5140SAndreas Gohr
1464ab5140SAndreas Gohr    /** @inheritdoc */
1564ab5140SAndreas Gohr    function minimumPermission() {
1664ab5140SAndreas Gohr        return AUTH_READ;
1764ab5140SAndreas Gohr    }
1864ab5140SAndreas Gohr
19*bb2b4f19SAndreas Gohr    /** @inheritdoc */
2064ab5140SAndreas Gohr    public function preProcess() {
2164ab5140SAndreas Gohr        global $INPUT;
2264ab5140SAndreas Gohr
2364ab5140SAndreas Gohr        // store the selected diff type in cookie
2464ab5140SAndreas Gohr        $difftype = $INPUT->str('difftype');
2564ab5140SAndreas Gohr        if(!empty($difftype)) {
2664ab5140SAndreas Gohr            set_doku_pref('difftype', $difftype);
2764ab5140SAndreas Gohr        }
2864ab5140SAndreas Gohr    }
2964ab5140SAndreas Gohr
30*bb2b4f19SAndreas Gohr    /** @inheritdoc */
31*bb2b4f19SAndreas Gohr    public function tplContent() {
32*bb2b4f19SAndreas Gohr        html_diff();
33*bb2b4f19SAndreas Gohr    }
34*bb2b4f19SAndreas Gohr
3564ab5140SAndreas Gohr}
36