xref: /dokuwiki/inc/Action/Diff.php (revision 64ab5140f7b1c996873fbfe9bab26d9202fbb773)
1*64ab5140SAndreas Gohr<?php
2*64ab5140SAndreas Gohr/**
3*64ab5140SAndreas Gohr * Created by IntelliJ IDEA.
4*64ab5140SAndreas Gohr * User: andi
5*64ab5140SAndreas Gohr * Date: 2/10/17
6*64ab5140SAndreas Gohr * Time: 3:30 PM
7*64ab5140SAndreas Gohr */
8*64ab5140SAndreas Gohr
9*64ab5140SAndreas Gohrnamespace dokuwiki\Action;
10*64ab5140SAndreas Gohr
11*64ab5140SAndreas Gohrclass Diff extends AbstractAction {
12*64ab5140SAndreas Gohr
13*64ab5140SAndreas Gohr    /** @inheritdoc */
14*64ab5140SAndreas Gohr    function minimumPermission() {
15*64ab5140SAndreas Gohr        return AUTH_READ;
16*64ab5140SAndreas Gohr    }
17*64ab5140SAndreas Gohr
18*64ab5140SAndreas Gohr    public function preProcess() {
19*64ab5140SAndreas Gohr        global $INPUT;
20*64ab5140SAndreas Gohr
21*64ab5140SAndreas Gohr        // store the selected diff type in cookie
22*64ab5140SAndreas Gohr        $difftype = $INPUT->str('difftype');
23*64ab5140SAndreas Gohr        if (!empty($difftype)) {
24*64ab5140SAndreas Gohr            set_doku_pref('difftype', $difftype);
25*64ab5140SAndreas Gohr        }
26*64ab5140SAndreas Gohr    }
27*64ab5140SAndreas Gohr
28*64ab5140SAndreas Gohr}
29