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