Got rid of the MagicWord indexing constants (MAG_xxx), replaced them by string indexi...
[lhc/web/wiklou.git] / includes / Defines.php
1 <?php
2 /**
3 * A few constants that might be needed during LocalSettings.php
4 * @package MediaWiki
5 */
6
7 /**
8 * Version constants for the benefit of extensions
9 */
10 define( 'MW_SPECIALPAGE_VERSION', 2 );
11
12 /**#@+
13 * Database related constants
14 */
15 define( 'DBO_DEBUG', 1 );
16 define( 'DBO_NOBUFFER', 2 );
17 define( 'DBO_IGNORE', 4 );
18 define( 'DBO_TRX', 8 );
19 define( 'DBO_DEFAULT', 16 );
20 define( 'DBO_PERSISTENT', 32 );
21 /**#@-*/
22
23 /**#@+
24 * Virtual namespaces; don't appear in the page database
25 */
26 define('NS_MEDIA', -2);
27 define('NS_SPECIAL', -1);
28 /**#@-*/
29
30 /**#@+
31 * Real namespaces
32 *
33 * Number 100 and beyond are reserved for custom namespaces;
34 * DO NOT assign standard namespaces at 100 or beyond.
35 * DO NOT Change integer values as they are most probably hardcoded everywhere
36 * see bug #696 which talked about that.
37 */
38 define('NS_MAIN', 0);
39 define('NS_TALK', 1);
40 define('NS_USER', 2);
41 define('NS_USER_TALK', 3);
42 define('NS_PROJECT', 4);
43 define('NS_PROJECT_TALK', 5);
44 define('NS_IMAGE', 6);
45 define('NS_IMAGE_TALK', 7);
46 define('NS_MEDIAWIKI', 8);
47 define('NS_MEDIAWIKI_TALK', 9);
48 define('NS_TEMPLATE', 10);
49 define('NS_TEMPLATE_TALK', 11);
50 define('NS_HELP', 12);
51 define('NS_HELP_TALK', 13);
52 define('NS_CATEGORY', 14);
53 define('NS_CATEGORY_TALK', 15);
54 /**#@-*/
55
56 /**
57 * Available feeds objects
58 * Should probably only be defined when a page is syndicated ie when
59 * $wgOut->isSyndicated() is true
60 */
61 $wgFeedClasses = array(
62 'rss' => 'RSSFeed',
63 'atom' => 'AtomFeed',
64 );
65
66 /**#@+
67 * Maths constants
68 */
69 define( 'MW_MATH_PNG', 0 );
70 define( 'MW_MATH_SIMPLE', 1 );
71 define( 'MW_MATH_HTML', 2 );
72 define( 'MW_MATH_SOURCE', 3 );
73 define( 'MW_MATH_MODERN', 4 );
74 define( 'MW_MATH_MATHML', 5 );
75 /**#@-*/
76
77 /**
78 * User rights management
79 * a big array of string defining a right, that's how they are saved in the
80 * database.
81 * @todo Is this necessary?
82 */
83 $wgAvailableRights = array(
84 'block',
85 'bot',
86 'createaccount',
87 'delete',
88 'edit',
89 'editinterface',
90 'import',
91 'importupload',
92 'move',
93 'patrol',
94 'protect',
95 'read',
96 'rollback',
97 'siteadmin',
98 'unwatchedpages',
99 'upload',
100 'userrights',
101 );
102
103 /**#@+
104 * Cache type
105 */
106 define( 'CACHE_ANYTHING', -1 ); // Use anything, as long as it works
107 define( 'CACHE_NONE', 0 ); // Do not cache
108 define( 'CACHE_DB', 1 ); // Store cache objects in the DB
109 define( 'CACHE_MEMCACHED', 2 ); // MemCached, must specify servers in $wgMemCacheServers
110 define( 'CACHE_ACCEL', 3 ); // eAccelerator or Turck, whichever is available
111 /**#@-*/
112
113
114
115 /**#@+
116 * Media types.
117 * This defines constants for the value returned by Image::getMediaType()
118 */
119 define( 'MEDIATYPE_UNKNOWN', 'UNKNOWN' ); // unknown format
120 define( 'MEDIATYPE_BITMAP', 'BITMAP' ); // some bitmap image or image source (like psd, etc). Can't scale up.
121 define( 'MEDIATYPE_DRAWING', 'DRAWING' ); // some vector drawing (SVG, WMF, PS, ...) or image source (oo-draw, etc). Can scale up.
122 define( 'MEDIATYPE_AUDIO', 'AUDIO' ); // simple audio file (ogg, mp3, wav, midi, whatever)
123 define( 'MEDIATYPE_VIDEO', 'VIDEO' ); // simple video file (ogg, mpg, etc; no not include formats here that may contain executable sections or scripts!)
124 define( 'MEDIATYPE_MULTIMEDIA', 'MULTIMEDIA' ); // Scriptable Multimedia (flash, advanced video container formats, etc)
125 define( 'MEDIATYPE_OFFICE', 'OFFICE' ); // Office Documents, Spreadsheets (office formats possibly containing apples, scripts, etc)
126 define( 'MEDIATYPE_TEXT', 'TEXT' ); // Plain text (possibly containing program code or scripts)
127 define( 'MEDIATYPE_EXECUTABLE', 'EXECUTABLE' ); // binary executable
128 define( 'MEDIATYPE_ARCHIVE', 'ARCHIVE' ); // archive file (zip, tar, etc)
129 /**#@-*/
130
131 /**#@+
132 * Antivirus result codes, for use in $wgAntivirusSetup.
133 */
134 define( 'AV_NO_VIRUS', 0 ); #scan ok, no virus found
135 define( 'AV_VIRUS_FOUND', 1 ); #virus found!
136 define( 'AV_SCAN_ABORTED', -1 ); #scan aborted, the file is probably imune
137 define( 'AV_SCAN_FAILED', false ); #scan failed (scanner not found or error in scanner)
138 /**#@-*/
139
140 /**#@+
141 * Anti-lock flags
142 * See DefaultSettings.php for a description
143 */
144 define( 'ALF_PRELOAD_LINKS', 1 );
145 define( 'ALF_PRELOAD_EXISTENCE', 2 );
146 define( 'ALF_NO_LINK_LOCK', 4 );
147 define( 'ALF_NO_BLOCK_LOCK', 8 );
148 /**#@-*/
149
150 /**#@+
151 * Date format selectors; used in user preference storage and by
152 * Language::date() and co.
153 */
154 define( 'MW_DATE_DEFAULT', '0' );
155 define( 'MW_DATE_MDY', '1' );
156 define( 'MW_DATE_DMY', '2' );
157 define( 'MW_DATE_YMD', '3' );
158 define( 'MW_DATE_ISO', 'ISO 8601' );
159 /**#@-*/
160
161 /**#@+
162 * RecentChange type identifiers
163 * This may be obsolete; log items are now used for moves?
164 */
165 define( 'RC_EDIT', 0);
166 define( 'RC_NEW', 1);
167 define( 'RC_MOVE', 2);
168 define( 'RC_LOG', 3);
169 define( 'RC_MOVE_OVER_REDIRECT', 4);
170 /**#@-*/
171
172 /**#@+
173 * Article edit flags
174 */
175 define( 'EDIT_NEW', 1 );
176 define( 'EDIT_UPDATE', 2 );
177 define( 'EDIT_MINOR', 4 );
178 define( 'EDIT_SUPPRESS_RC', 8 );
179 define( 'EDIT_FORCE_BOT', 16 );
180 define( 'EDIT_DEFER_UPDATES', 32 );
181 /**#@-*/
182
183 ?>