A bunch of Unicode constants got moved at some point out of the Unicode normalization...
[lhc/web/wiklou.git] / includes / Defines.php
1 <?php
2 /**
3 * A few constants that might be needed during LocalSettings.php
4 */
5
6 /**
7 * Version constants for the benefit of extensions
8 */
9 define( 'MW_SPECIALPAGE_VERSION', 2 );
10
11 /**#@+
12 * Database related constants
13 */
14 define( 'DBO_DEBUG', 1 );
15 define( 'DBO_NOBUFFER', 2 );
16 define( 'DBO_IGNORE', 4 );
17 define( 'DBO_TRX', 8 );
18 define( 'DBO_DEFAULT', 16 );
19 define( 'DBO_PERSISTENT', 32 );
20 /**#@-*/
21
22 # Valid database indexes
23 # Operation-based indexes
24 define( 'DB_SLAVE', -1 ); # Read from the slave (or only server)
25 define( 'DB_MASTER', -2 ); # Write to master (or only server)
26 define( 'DB_LAST', -3 ); # Whatever database was used last
27
28 # Obsolete aliases
29 define( 'DB_READ', -1 );
30 define( 'DB_WRITE', -2 );
31
32
33 /**#@+
34 * Virtual namespaces; don't appear in the page database
35 */
36 define('NS_MEDIA', -2);
37 define('NS_SPECIAL', -1);
38 /**#@-*/
39
40 /**#@+
41 * Real namespaces
42 *
43 * Number 100 and beyond are reserved for custom namespaces;
44 * DO NOT assign standard namespaces at 100 or beyond.
45 * DO NOT Change integer values as they are most probably hardcoded everywhere
46 * see bug #696 which talked about that.
47 */
48 define('NS_MAIN', 0);
49 define('NS_TALK', 1);
50 define('NS_USER', 2);
51 define('NS_USER_TALK', 3);
52 define('NS_PROJECT', 4);
53 define('NS_PROJECT_TALK', 5);
54 define('NS_IMAGE', 6);
55 define('NS_IMAGE_TALK', 7);
56 define('NS_MEDIAWIKI', 8);
57 define('NS_MEDIAWIKI_TALK', 9);
58 define('NS_TEMPLATE', 10);
59 define('NS_TEMPLATE_TALK', 11);
60 define('NS_HELP', 12);
61 define('NS_HELP_TALK', 13);
62 define('NS_CATEGORY', 14);
63 define('NS_CATEGORY_TALK', 15);
64 /**#@-*/
65
66 /**
67 * Available feeds objects
68 * Should probably only be defined when a page is syndicated ie when
69 * $wgOut->isSyndicated() is true
70 */
71 $wgFeedClasses = array(
72 'rss' => 'RSSFeed',
73 'atom' => 'AtomFeed',
74 );
75
76 /**#@+
77 * Maths constants
78 */
79 define( 'MW_MATH_PNG', 0 );
80 define( 'MW_MATH_SIMPLE', 1 );
81 define( 'MW_MATH_HTML', 2 );
82 define( 'MW_MATH_SOURCE', 3 );
83 define( 'MW_MATH_MODERN', 4 );
84 define( 'MW_MATH_MATHML', 5 );
85 /**#@-*/
86
87 /**#@+
88 * Cache type
89 */
90 define( 'CACHE_ANYTHING', -1 ); // Use anything, as long as it works
91 define( 'CACHE_NONE', 0 ); // Do not cache
92 define( 'CACHE_DB', 1 ); // Store cache objects in the DB
93 define( 'CACHE_MEMCACHED', 2 ); // MemCached, must specify servers in $wgMemCacheServers
94 define( 'CACHE_ACCEL', 3 ); // eAccelerator or Turck, whichever is available
95 define( 'CACHE_DBA', 4 ); // Use PHP's DBA extension to store in a DBM-style database
96 /**#@-*/
97
98
99
100 /**#@+
101 * Media types.
102 * This defines constants for the value returned by Image::getMediaType()
103 */
104 define( 'MEDIATYPE_UNKNOWN', 'UNKNOWN' ); // unknown format
105 define( 'MEDIATYPE_BITMAP', 'BITMAP' ); // some bitmap image or image source (like psd, etc). Can't scale up.
106 define( 'MEDIATYPE_DRAWING', 'DRAWING' ); // some vector drawing (SVG, WMF, PS, ...) or image source (oo-draw, etc). Can scale up.
107 define( 'MEDIATYPE_AUDIO', 'AUDIO' ); // simple audio file (ogg, mp3, wav, midi, whatever)
108 define( 'MEDIATYPE_VIDEO', 'VIDEO' ); // simple video file (ogg, mpg, etc; no not include formats here that may contain executable sections or scripts!)
109 define( 'MEDIATYPE_MULTIMEDIA', 'MULTIMEDIA' ); // Scriptable Multimedia (flash, advanced video container formats, etc)
110 define( 'MEDIATYPE_OFFICE', 'OFFICE' ); // Office Documents, Spreadsheets (office formats possibly containing apples, scripts, etc)
111 define( 'MEDIATYPE_TEXT', 'TEXT' ); // Plain text (possibly containing program code or scripts)
112 define( 'MEDIATYPE_EXECUTABLE', 'EXECUTABLE' ); // binary executable
113 define( 'MEDIATYPE_ARCHIVE', 'ARCHIVE' ); // archive file (zip, tar, etc)
114 /**#@-*/
115
116 /**#@+
117 * Antivirus result codes, for use in $wgAntivirusSetup.
118 */
119 define( 'AV_NO_VIRUS', 0 ); #scan ok, no virus found
120 define( 'AV_VIRUS_FOUND', 1 ); #virus found!
121 define( 'AV_SCAN_ABORTED', -1 ); #scan aborted, the file is probably imune
122 define( 'AV_SCAN_FAILED', false ); #scan failed (scanner not found or error in scanner)
123 /**#@-*/
124
125 /**#@+
126 * Anti-lock flags
127 * See DefaultSettings.php for a description
128 */
129 define( 'ALF_PRELOAD_LINKS', 1 );
130 define( 'ALF_PRELOAD_EXISTENCE', 2 );
131 define( 'ALF_NO_LINK_LOCK', 4 );
132 define( 'ALF_NO_BLOCK_LOCK', 8 );
133 /**#@-*/
134
135 /**#@+
136 * Date format selectors; used in user preference storage and by
137 * Language::date() and co.
138 */
139 /*define( 'MW_DATE_DEFAULT', '0' );
140 define( 'MW_DATE_MDY', '1' );
141 define( 'MW_DATE_DMY', '2' );
142 define( 'MW_DATE_YMD', '3' );
143 define( 'MW_DATE_ISO', 'ISO 8601' );*/
144 define( 'MW_DATE_DEFAULT', 'default' );
145 define( 'MW_DATE_MDY', 'mdy' );
146 define( 'MW_DATE_DMY', 'dmy' );
147 define( 'MW_DATE_YMD', 'ymd' );
148 define( 'MW_DATE_ISO', 'ISO 8601' );
149 /**#@-*/
150
151 /**#@+
152 * RecentChange type identifiers
153 * This may be obsolete; log items are now used for moves?
154 */
155 define( 'RC_EDIT', 0);
156 define( 'RC_NEW', 1);
157 define( 'RC_MOVE', 2);
158 define( 'RC_LOG', 3);
159 define( 'RC_MOVE_OVER_REDIRECT', 4);
160 /**#@-*/
161
162 /**#@+
163 * Article edit flags
164 */
165 define( 'EDIT_NEW', 1 );
166 define( 'EDIT_UPDATE', 2 );
167 define( 'EDIT_MINOR', 4 );
168 define( 'EDIT_SUPPRESS_RC', 8 );
169 define( 'EDIT_FORCE_BOT', 16 );
170 define( 'EDIT_DEFER_UPDATES', 32 );
171 define( 'EDIT_AUTOSUMMARY', 64 );
172 /**#@-*/
173
174 /**
175 * Flags for Database::makeList()
176 * These are also available as Database class constants
177 */
178 define( 'LIST_COMMA', 0 );
179 define( 'LIST_AND', 1 );
180 define( 'LIST_SET', 2 );
181 define( 'LIST_NAMES', 3);
182 define( 'LIST_OR', 4);
183
184 /**
185 * Unicode and normalisation related
186 */
187 require_once dirname(__FILE__).'/normal/UtfNormalDefines.php';
188
189 # Hook support constants
190 define( 'MW_SUPPORTS_EDITFILTERMERGED', 1 );
191 define( 'MW_SUPPORTS_PARSERFIRSTCALLINIT', 1 );
192
193 # Allowed values for Parser::$mOutputType
194 # Parameter to Parser::startExternalParse().
195 define( 'OT_HTML', 1 );
196 define( 'OT_WIKI', 2 );
197 define( 'OT_PREPROCESS', 3 );
198 define( 'OT_MSG' , 3 ); // b/c alias for OT_PREPROCESS
199
200 # Flags for Parser::setFunctionHook
201 define( 'SFH_NO_HASH', 1 );
202 define( 'SFH_OBJECT_ARGS', 2 );
203
204 # Flags for Parser::replaceLinkHolders
205 define( 'RLH_FOR_UPDATE', 1 );
206
207 # Autopromote conditions (must be here and not in Autopromote.php, so that
208 # they're loaded for DefaultSettings.php before AutoLoader.php)
209 define( 'APCOND_EDITCOUNT', 1 );
210 define( 'APCOND_AGE', 2 );
211 define( 'APCOND_EMAILCONFIRMED', 3 );
212 define( 'APCOND_INGROUPS', 4 );