Move minimum database versions to Defines.php
[lhc/web/wiklou.git] / includes / Defines.php
1 <?php
2 /**
3 * Global constants declarations. Do *NOT* include *anything* in this file which is
4 * not a define() declaration; this file is included in all sorts of scopes and must
5 * be parseable by PHP 4 without errors.
6 *
7 * Note: these constants must all be resolvable at compile time by HipHop,
8 * since this file will not be executed during request startup for a compiled
9 * MediaWiki.
10 *
11 * @file
12 */
13
14 /**@{
15 * Version constants for the benefit of extensions
16 */
17 define( 'MW_VERSION', '1.19alpha' );
18 define( 'MW_SPECIALPAGE_VERSION', 2 );
19
20 /**
21 * Minimum version of PHP required to run; entry points will die
22 * if they try to run on a version older than this
23 */
24 define( 'MW_MIN_PHP_VERSION', '5.2.3' );
25
26 define( 'MW_MIN_MYSQL_VERSION', '4.0.14' );
27 define( 'MW_MIN_ORACLE_VERSION', '9.0.1' );
28
29 /**@}*/
30
31 /**@{
32 * Database related constants
33 */
34 define( 'DBO_DEBUG', 1 );
35 define( 'DBO_NOBUFFER', 2 );
36 define( 'DBO_IGNORE', 4 );
37 define( 'DBO_TRX', 8 );
38 define( 'DBO_DEFAULT', 16 );
39 define( 'DBO_PERSISTENT', 32 );
40 define( 'DBO_SYSDBA', 64 ); //for oracle maintenance
41 define( 'DBO_DDLMODE', 128 ); // when using schema files: mostly for Oracle
42 /**@}*/
43
44 /**@{
45 * Valid database indexes
46 * Operation-based indexes
47 */
48 define( 'DB_SLAVE', -1 ); # Read from the slave (or only server)
49 define( 'DB_MASTER', -2 ); # Write to master (or only server)
50 define( 'DB_LAST', -3 ); # Whatever database was used last
51 /**@}*/
52
53 # Obsolete aliases
54 define( 'DB_READ', -1 );
55 define( 'DB_WRITE', -2 );
56
57
58 /**@{
59 * Virtual namespaces; don't appear in the page database
60 */
61 define( 'NS_MEDIA', -2 );
62 define( 'NS_SPECIAL', -1 );
63 /**@}*/
64
65 /**@{
66 * Real namespaces
67 *
68 * Number 100 and beyond are reserved for custom namespaces;
69 * DO NOT assign standard namespaces at 100 or beyond.
70 * DO NOT Change integer values as they are most probably hardcoded everywhere
71 * see bug #696 which talked about that.
72 */
73 define( 'NS_MAIN', 0 );
74 define( 'NS_TALK', 1 );
75 define( 'NS_USER', 2 );
76 define( 'NS_USER_TALK', 3 );
77 define( 'NS_PROJECT', 4 );
78 define( 'NS_PROJECT_TALK', 5 );
79 define( 'NS_FILE', 6 );
80 define( 'NS_FILE_TALK', 7 );
81 define( 'NS_MEDIAWIKI', 8 );
82 define( 'NS_MEDIAWIKI_TALK', 9 );
83 define( 'NS_TEMPLATE', 10 );
84 define( 'NS_TEMPLATE_TALK', 11 );
85 define( 'NS_HELP', 12 );
86 define( 'NS_HELP_TALK', 13 );
87 define( 'NS_CATEGORY', 14 );
88 define( 'NS_CATEGORY_TALK', 15 );
89
90 /**
91 * NS_IMAGE and NS_IMAGE_TALK are the pre-v1.14 names for NS_FILE and
92 * NS_FILE_TALK respectively, and are kept for compatibility.
93 *
94 * When writing code that should be compatible with older MediaWiki
95 * versions, either stick to the old names or define the new constants
96 * yourself, if they're not defined already.
97 */
98 define( 'NS_IMAGE', NS_FILE );
99 define( 'NS_IMAGE_TALK', NS_FILE_TALK );
100 /**@}*/
101
102 /**@{
103 * Cache type
104 */
105 define( 'CACHE_ANYTHING', -1 ); // Use anything, as long as it works
106 define( 'CACHE_NONE', 0 ); // Do not cache
107 define( 'CACHE_DB', 1 ); // Store cache objects in the DB
108 define( 'CACHE_MEMCACHED', 2 ); // MemCached, must specify servers in $wgMemCacheServers
109 define( 'CACHE_ACCEL', 3 ); // eAccelerator
110 define( 'CACHE_DBA', 4 ); // Use PHP's DBA extension to store in a DBM-style database
111 /**@}*/
112
113 /**@{
114 * Media types.
115 * This defines constants for the value returned by File::getMediaType()
116 */
117 define( 'MEDIATYPE_UNKNOWN', 'UNKNOWN' ); // unknown format
118 define( 'MEDIATYPE_BITMAP', 'BITMAP' ); // some bitmap image or image source (like psd, etc). Can't scale up.
119 define( 'MEDIATYPE_DRAWING', 'DRAWING' ); // some vector drawing (SVG, WMF, PS, ...) or image source (oo-draw, etc). Can scale up.
120 define( 'MEDIATYPE_AUDIO', 'AUDIO' ); // simple audio file (ogg, mp3, wav, midi, whatever)
121 define( 'MEDIATYPE_VIDEO', 'VIDEO' ); // simple video file (ogg, mpg, etc; no not include formats here that may contain executable sections or scripts!)
122 define( 'MEDIATYPE_MULTIMEDIA', 'MULTIMEDIA' ); // Scriptable Multimedia (flash, advanced video container formats, etc)
123 define( 'MEDIATYPE_OFFICE', 'OFFICE' ); // Office Documents, Spreadsheets (office formats possibly containing apples, scripts, etc)
124 define( 'MEDIATYPE_TEXT', 'TEXT' ); // Plain text (possibly containing program code or scripts)
125 define( 'MEDIATYPE_EXECUTABLE', 'EXECUTABLE' ); // binary executable
126 define( 'MEDIATYPE_ARCHIVE', 'ARCHIVE' ); // archive file (zip, tar, etc)
127 define( 'MEDIATYPE_DATA', 'DATA' ); // A generic data file (like kml and kmz)
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 /**@}*/