You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

42 lines
642 B

  1. <?php
  2. namespace dokuwiki\Action;
  3. use dokuwiki\Ui\Editor;
  4. use dokuwiki\Ui;
  5. /**
  6. * Class Source
  7. *
  8. * Show the source of a page
  9. *
  10. * @package dokuwiki\Action
  11. */
  12. class Source extends AbstractAction
  13. {
  14. /** @inheritdoc */
  15. public function minimumPermission()
  16. {
  17. return AUTH_READ;
  18. }
  19. /** @inheritdoc */
  20. public function preProcess()
  21. {
  22. global $TEXT;
  23. global $INFO;
  24. global $ID;
  25. global $REV;
  26. if ($INFO['exists']) {
  27. $TEXT = rawWiki($ID, $REV);
  28. }
  29. }
  30. /** @inheritdoc */
  31. public function tplContent()
  32. {
  33. (new Editor())->show();
  34. }
  35. }