1<?php 2 3namespace dokuwiki\Action; 4 5use dokuwiki\Ui\Editor; 6use dokuwiki\Ui; 7 8/** 9 * Class Source 10 * 11 * Show the source of a page 12 * 13 * @package dokuwiki\Action 14 */ 15class Source 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 $TEXT; 27 global $INFO; 28 global $ID; 29 global $REV; 30 31 if ($INFO['exists']) { 32 $TEXT = rawWiki($ID, $REV); 33 } 34 } 35 36 /** @inheritdoc */ 37 public function tplContent() 38 { 39 (new Editor())->show(); 40 } 41} 42