Follow-up r75476: Windows set command treats everything until the && as part of the...
[lhc/web/wiklou.git] / includes / Defines.php
1 <?php
2 /**
3 * A few constants that might be needed during LocalSettings.php
4 * @file
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 define( 'DBO_SYSDBA', 64 ); //for oracle maintenance
22 /**@}*/
23
24 /**@{
25 * Valid database indexes
26 * Operation-based indexes
27 */
28 define( 'DB_SLAVE', -1 ); # Read from the slave (or only server)
29 define( 'DB_MASTER', -2 ); # Write to master (or only server)
30 define( 'DB_LAST', -3 ); # Whatever database was used last
31 /**@}*/
32
33 # Obsolete aliases
34 define( 'DB_READ', -1 );
35 define( 'DB_WRITE', -2 );
36
37
38 /**@{
39 * Virtual namespaces; don't appear in the page database
40 */
41 define( 'NS_MEDIA', -2 );
42 define( 'NS_SPECIAL', -1 );
43 /**@}*/
44
45 /**@{
46 * Real namespaces
47 *
48 * Number 100 and beyond are reserved for custom namespaces;
49 * DO NOT assign standard namespaces at 100 or beyond.
50 * DO NOT Change integer values as they are most probably hardcoded everywhere
51 * see bug #696 which talked about that.
52 */
53 define( 'NS_MAIN', 0 );
54 define( 'NS_TALK', 1 );
55 define( 'NS_USER', 2 );
56 define( 'NS_USER_TALK', 3 );
57 define( 'NS_PROJECT', 4 );
58 define( 'NS_PROJECT_TALK', 5 );
59 define( 'NS_FILE', 6 );
60 define( 'NS_FILE_TALK', 7 );
61 define( 'NS_MEDIAWIKI', 8 );
62 define( 'NS_MEDIAWIKI_TALK', 9 );
63 define( 'NS_TEMPLATE', 10 );
64 define( 'NS_TEMPLATE_TALK', 11 );
65 define( 'NS_HELP', 12 );
66 define( 'NS_HELP_TALK', 13 );
67 define( 'NS_CATEGORY', 14 );
68 define( 'NS_CATEGORY_TALK', 15 );
69
70 /**
71 * NS_IMAGE and NS_IMAGE_TALK are the pre-v1.14 names for NS_FILE and
72 * NS_FILE_TALK respectively, and are kept for compatibility.
73 *
74 * When writing code that should be compatible with older MediaWiki
75 * versions, either stick to the old names or define the new constants
76 * yourself, if they're not defined already.
77 */
78 define( 'NS_IMAGE', NS_FILE );
79 define( 'NS_IMAGE_TALK', NS_FILE_TALK );
80 /**@}*/
81
82 /**
83 * Available feeds objects
84 * Should probably only be defined when a page is syndicated ie when
85 * $wgOut->isSyndicated() is true
86 */
87 $wgFeedClasses = array(
88 'rss' => 'RSSFeed',
89 'atom' => 'AtomFeed',
90 );
91
92 /**@{
93 * Maths constants
94 */
95 define( 'MW_MATH_PNG', 0 );
96 define( 'MW_MATH_SIMPLE', 1 );
97 define( 'MW_MATH_HTML', 2 );
98 define( 'MW_MATH_SOURCE', 3 );
99 define( 'MW_MATH_MODERN', 4 );
100 define( 'MW_MATH_MATHML', 5 );
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
111 define( 'CACHE_DBA', 4 ); // Use PHP's DBA extension to store in a DBM-style database
112 /**@}*/
113
114 /**@{
115 * Media types.
116 * This defines constants for the value returned by Image::getMediaType()
117 */
118 define( 'MEDIATYPE_UNKNOWN', 'UNKNOWN' ); // unknown format
119 define( 'MEDIATYPE_BITMAP', 'BITMAP' ); // some bitmap image or image source (like psd, etc). Can't scale up.
120 define( 'MEDIATYPE_DRAWING', 'DRAWING' ); // some vector drawing (SVG, WMF, PS, ...) or image source (oo-draw, etc). Can scale up.
121 define( 'MEDIATYPE_AUDIO', 'AUDIO' ); // simple audio file (ogg, mp3, wav, midi, whatever)
122 define( 'MEDIATYPE_VIDEO', 'VIDEO' ); // simple video file (ogg, mpg, etc; no not include formats here that may contain executable sections or scripts!)
123 define( 'MEDIATYPE_MULTIMEDIA', 'MULTIMEDIA' ); // Scriptable Multimedia (flash, advanced video container formats, etc)
124 define( 'MEDIATYPE_OFFICE', 'OFFICE' ); // Office Documents, Spreadsheets (office formats possibly containing apples, scripts, etc)
125 define( 'MEDIATYPE_TEXT', 'TEXT' ); // Plain text (possibly containing program code or scripts)
126 define( 'MEDIATYPE_EXECUTABLE', 'EXECUTABLE' ); // binary executable
127 define( 'MEDIATYPE_ARCHIVE', 'ARCHIVE' ); // archive file (zip, tar, etc)
128 /**@}*/
129
130 /**@{
131 * Antivirus result codes, for use in $wgAntivirusSetup.
132 */
133 define( 'AV_NO_VIRUS', 0 ); #scan ok, no virus found
134 define( 'AV_VIRUS_FOUND', 1 ); #virus found!
135 define( 'AV_SCAN_ABORTED', -1 ); #scan aborted, the file is probably imune
136 define( 'AV_SCAN_FAILED', false ); #scan failed (scanner not found or error in scanner)
137 /**@}*/
138
139 /**@{
140 * Anti-lock flags
141 * See DefaultSettings.php for a description
142 */
143 define( 'ALF_PRELOAD_LINKS', 1 );
144 define( 'ALF_PRELOAD_EXISTENCE', 2 );
145 define( 'ALF_NO_LINK_LOCK', 4 );
146 define( 'ALF_NO_BLOCK_LOCK', 8 );
147 /**@}*/
148
149 /**@{
150 * Date format selectors; used in user preference storage and by
151 * Language::date() and co.
152 */
153 /*define( 'MW_DATE_DEFAULT', '0' );
154 define( 'MW_DATE_MDY', '1' );
155 define( 'MW_DATE_DMY', '2' );
156 define( 'MW_DATE_YMD', '3' );
157 define( 'MW_DATE_ISO', 'ISO 8601' );*/
158 define( 'MW_DATE_DEFAULT', 'default' );
159 define( 'MW_DATE_MDY', 'mdy' );
160 define( 'MW_DATE_DMY', 'dmy' );
161 define( 'MW_DATE_YMD', 'ymd' );
162 define( 'MW_DATE_ISO', 'ISO 8601' );
163 /**@}*/
164
165 /**@{
166 * RecentChange type identifiers
167 * This may be obsolete; log items are now used for moves?
168 */
169 define( 'RC_EDIT', 0);
170 define( 'RC_NEW', 1);
171 define( 'RC_MOVE', 2);
172 define( 'RC_LOG', 3);
173 define( 'RC_MOVE_OVER_REDIRECT', 4);
174 /**@}*/
175
176 /**@{
177 * Article edit flags
178 */
179 define( 'EDIT_NEW', 1 );
180 define( 'EDIT_UPDATE', 2 );
181 define( 'EDIT_MINOR', 4 );
182 define( 'EDIT_SUPPRESS_RC', 8 );
183 define( 'EDIT_FORCE_BOT', 16 );
184 define( 'EDIT_DEFER_UPDATES', 32 );
185 define( 'EDIT_AUTOSUMMARY', 64 );
186 /**@}*/
187
188 /**@{
189 * Flags for Database::makeList()
190 * These are also available as Database class constants
191 */
192 define( 'LIST_COMMA', 0 );
193 define( 'LIST_AND', 1 );
194 define( 'LIST_SET', 2 );
195 define( 'LIST_NAMES', 3);
196 define( 'LIST_OR', 4);
197 define( 'LIST_SET_PREPARED', 8); // List of (?, ?, ?) for DatabaseIbm_db2
198 /**@}*/
199
200 /**
201 * Unicode and normalisation related
202 */
203 require_once dirname(__FILE__).'/normal/UtfNormalDefines.php';
204
205 /**@{
206 * Hook support constants
207 */
208 define( 'MW_SUPPORTS_EDITFILTERMERGED', 1 );
209 define( 'MW_SUPPORTS_PARSERFIRSTCALLINIT', 1 );
210 define( 'MW_SUPPORTS_LOCALISATIONCACHE', 1 );
211 /**@}*/
212
213 /** Support for $wgResourceModules */
214 define( 'MW_SUPPORTS_RESOURCE_MODULES', 1 );
215
216 /**@{
217 * Allowed values for Parser::$mOutputType
218 * Parameter to Parser::startExternalParse().
219 */
220 define( 'OT_HTML', 1 );
221 define( 'OT_WIKI', 2 );
222 define( 'OT_PREPROCESS', 3 );
223 define( 'OT_MSG' , 3 ); // b/c alias for OT_PREPROCESS
224 define( 'OT_PLAIN', 4 );
225 /**@}*/
226
227 /**@{
228 * Flags for Parser::setFunctionHook
229 */
230 define( 'SFH_NO_HASH', 1 );
231 define( 'SFH_OBJECT_ARGS', 2 );
232 /**@}*/
233
234 /**
235 * Flags for Parser::setLinkHook
236 */
237 define( 'SLH_PATTERN', 1 );
238
239 /**
240 * Flags for Parser::replaceLinkHolders
241 */
242 define( 'RLH_FOR_UPDATE', 1 );
243
244 /**@{
245 * Autopromote conditions (must be here and not in Autopromote.php, so that
246 * they're loaded for DefaultSettings.php before AutoLoader.php)
247 */
248 define( 'APCOND_EDITCOUNT', 1 );
249 define( 'APCOND_AGE', 2 );
250 define( 'APCOND_EMAILCONFIRMED', 3 );
251 define( 'APCOND_INGROUPS', 4 );
252 define( 'APCOND_ISIP', 5 );
253 define( 'APCOND_IPINRANGE', 6 );
254 define( 'APCOND_AGE_FROM_EDIT', 7 );
255 define( 'APCOND_BLOCKED', 8 );
256 /**@}*/