[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/ -> defines.php (source)

   1  <?php
   2  
   3  /**
   4   * Set up globally available constants
   5   */
   6  
   7  /**
   8   * Auth Levels
   9   * @file inc/auth.php
  10   */
  11  define('AUTH_NONE', 0);
  12  define('AUTH_READ', 1);
  13  define('AUTH_EDIT', 2);
  14  define('AUTH_CREATE', 4);
  15  define('AUTH_UPLOAD', 8);
  16  define('AUTH_DELETE', 16);
  17  define('AUTH_ADMIN', 255);
  18  
  19  /**
  20   * Message types
  21   * @see msg()
  22   */
  23  define('MSG_PUBLIC', 0);
  24  define('MSG_USERS_ONLY', 1);
  25  define('MSG_MANAGERS_ONLY', 2);
  26  define('MSG_ADMINS_ONLY', 4);
  27  
  28  /**
  29   * Lexer constants
  30   * @see \dokuwiki\Parsing\Lexer\Lexer
  31   */
  32  define('DOKU_LEXER_ENTER', 1);
  33  define('DOKU_LEXER_MATCHED', 2);
  34  define('DOKU_LEXER_UNMATCHED', 3);
  35  define('DOKU_LEXER_EXIT', 4);
  36  define('DOKU_LEXER_SPECIAL', 5);
  37  
  38  /**
  39   * Constants for known core changelog line types.
  40   * @file inc/changelog.php
  41   */
  42  define('DOKU_CHANGE_TYPE_CREATE', 'C');
  43  define('DOKU_CHANGE_TYPE_EDIT', 'E');
  44  define('DOKU_CHANGE_TYPE_MINOR_EDIT', 'e');
  45  define('DOKU_CHANGE_TYPE_DELETE', 'D');
  46  define('DOKU_CHANGE_TYPE_REVERT', 'R');
  47  
  48  /**
  49   * Changelog filter constants
  50   * @file inc/changelog.php
  51   */
  52  define('RECENTS_SKIP_DELETED', 2);
  53  define('RECENTS_SKIP_MINORS', 4);
  54  define('RECENTS_SKIP_SUBSPACES', 8);
  55  define('RECENTS_MEDIA_CHANGES', 16);
  56  define('RECENTS_MEDIA_PAGES_MIXED', 32);
  57  define('RECENTS_ONLY_CREATION', 64);
  58  
  59  /**
  60   * Media error types
  61   * @file inc/media.php
  62   */
  63  define('DOKU_MEDIA_DELETED', 1);
  64  define('DOKU_MEDIA_NOT_AUTH', 2);
  65  define('DOKU_MEDIA_INUSE', 4);
  66  define('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
  78  if (!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL', "\r\n");
  79  // phpcs:enable
  80  // define('MAILHEADER_ASCIIONLY',1); // we currently don't use this