1<?php 2 3namespace dokuwiki\Action; 4 5use dokuwiki\Ui\PageDiff; 6use dokuwiki\Ui; 7 8/** 9 * Class Diff 10 * 11 * Show the differences between two revisions 12 * 13 * @package dokuwiki\Action 14 */ 15class Diff extends AbstractAction 16{ 17 /** @inheritdoc */ 18 public function minimumPermission() 19 { 20 return AUTH_READ; 21 } 22 23 /** @inheritdoc */ 24 public function preProcess() 25 { 26 global $INPUT; 27 28 // store the selected diff type in cookie 29 $difftype = $INPUT->str('difftype'); 30 if (!empty($difftype)) { 31 set_doku_pref('difftype', $difftype); 32 } 33 } 34 35 /** @inheritdoc */ 36 public function tplContent() 37 { 38 global $INFO; 39 (new PageDiff($INFO['id']))->preference('showIntro', true)->show(); 40 } 41} 42