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 $this->showBanner(); 35 (new Ui\ConflictForm)->show(con($PRE, $TEXT, $SUF), $SUM); 36 (new Ui\Diff)->show(con($PRE, $TEXT, $SUF), false); 37 } 38 39 /** 40 * Show warning on conflict detection 41 * 42 * @author Andreas Gohr <andi@splitbrain.org> 43 * 44 * @return void 45 */ 46 protected function showBanner() 47 { 48 // print intro 49 print p_locale_xhtml('conflict'); 50 } 51 52 53} 54