defines.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * Set up globally available constants
  4. */
  5. /**
  6. * Auth Levels
  7. * @file inc/auth.php
  8. */
  9. define('AUTH_NONE', 0);
  10. define('AUTH_READ', 1);
  11. define('AUTH_EDIT', 2);
  12. define('AUTH_CREATE', 4);
  13. define('AUTH_UPLOAD', 8);
  14. define('AUTH_DELETE', 16);
  15. define('AUTH_ADMIN', 255);
  16. /**
  17. * Message types
  18. * @see msg()
  19. */
  20. define('MSG_PUBLIC', 0);
  21. define('MSG_USERS_ONLY', 1);
  22. define('MSG_MANAGERS_ONLY', 2);
  23. define('MSG_ADMINS_ONLY', 4);
  24. /**
  25. * Lexer constants
  26. * @see \dokuwiki\Parsing\Lexer\Lexer
  27. */
  28. define('DOKU_LEXER_ENTER', 1);
  29. define('DOKU_LEXER_MATCHED', 2);
  30. define('DOKU_LEXER_UNMATCHED', 3);
  31. define('DOKU_LEXER_EXIT', 4);
  32. define('DOKU_LEXER_SPECIAL', 5);
  33. /**
  34. * Constants for known core changelog line types.
  35. * @file inc/changelog.php
  36. */
  37. define('DOKU_CHANGE_TYPE_CREATE', 'C');
  38. define('DOKU_CHANGE_TYPE_EDIT', 'E');
  39. define('DOKU_CHANGE_TYPE_MINOR_EDIT', 'e');
  40. define('DOKU_CHANGE_TYPE_DELETE', 'D');
  41. define('DOKU_CHANGE_TYPE_REVERT', 'R');
  42. /**
  43. * Changelog filter constants
  44. * @file inc/changelog.php
  45. */
  46. define('RECENTS_SKIP_DELETED', 2);
  47. define('RECENTS_SKIP_MINORS', 4);
  48. define('RECENTS_SKIP_SUBSPACES', 8);
  49. define('RECENTS_MEDIA_CHANGES', 16);
  50. define('RECENTS_MEDIA_PAGES_MIXED', 32);
  51. define('RECENTS_ONLY_CREATION', 64);
  52. /**
  53. * Media error types
  54. * @file inc/media.php
  55. */
  56. define('DOKU_MEDIA_DELETED', 1);
  57. define('DOKU_MEDIA_NOT_AUTH', 2);
  58. define('DOKU_MEDIA_INUSE', 4);
  59. define('DOKU_MEDIA_EMPTY_NS', 8);
  60. /**
  61. * Mail header constants
  62. *
  63. * EOL is defined as CRLF in RFC822 and seems to work on modern systems. We had problems with
  64. * older MTAs in the past that expected LF only, so this constant remains changeable for now
  65. *
  66. * @file inc/mail.php
  67. * @file inc/Mailer.class.php
  68. */
  69. // phpcs:disable
  70. if (!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL', "\r\n");
  71. // phpcs:enable
  72. // define('MAILHEADER_ASCIIONLY',1); // we currently don't use this