xref: /dokuwiki/inc/Ui/MediaDiff.php (revision 63ab9afea47c7d80a8ede45def7caa27e9d03276)
1<?php
2
3namespace dokuwiki\Ui;
4
5use dokuwiki\ChangeLog\MediaChangeLog;
6use dokuwiki\Extension\Event;
7use dokuwiki\Form\Form;
8
9/**
10 * DokuWiki MediaDiff Interface
11 *
12 * @package dokuwiki\Ui
13 */
14class MediaDiff extends Diff
15{
16    /* @var string */
17    protected $id;
18    /* @var bool */
19    protected $fromajax;
20
21    /**
22     * MediaDiff Ui constructor
23     *
24     * @param string $id  id of media
25     * @param bool $fromajax
26     */
27    public function __construct($id, $fromajax = false)
28    {
29        $this->id = $id;
30        $this->fromajax = $fromajax;
31    }
32
33    /**
34     * Shows difference between two revisions of media
35     *
36     * @param bool $fromajax
37     */
38    public function show()
39    {
40        $ns = getNS($this->id);
41        $auth = auth_quickaclcheck("$ns:*");
42        media_diff($this->id, $ns, $auth, $this->fromajax);
43    }
44
45}
46