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.
 
 
 
 
 

53 lines
1012 B

  1. <?php
  2. namespace dokuwiki\Action;
  3. use dokuwiki\Ui\Login;
  4. use dokuwiki\Extension\Event;
  5. use dokuwiki\Ui;
  6. /**
  7. * Class Denied
  8. *
  9. * Show the access denied screen
  10. *
  11. * @package dokuwiki\Action
  12. */
  13. class Denied extends AbstractAction
  14. {
  15. /** @inheritdoc */
  16. public function minimumPermission()
  17. {
  18. return AUTH_NONE;
  19. }
  20. /** @inheritdoc */
  21. public function tplContent()
  22. {
  23. $this->showBanner();
  24. $data = null;
  25. $event = new Event('ACTION_DENIED_TPLCONTENT', $data);
  26. if ($event->advise_before()) {
  27. global $INPUT;
  28. if (empty($INPUT->server->str('REMOTE_USER')) && actionOK('login')) {
  29. (new Login())->show();
  30. }
  31. }
  32. $event->advise_after();
  33. }
  34. /**
  35. * Display error on denied pages
  36. *
  37. * @author Andreas Gohr <andi@splitbrain.org>
  38. *
  39. * @return void
  40. */
  41. public function showBanner()
  42. {
  43. // print intro
  44. echo p_locale_xhtml('denied');
  45. }
  46. }