Bug #26059 — Add support for KML/KMZ filetype
[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 define( 'DBO_DDLMODE', 128 ); // when using schema files: mostly for Oracle
23 /**@}*/
24
25 /**@{
26 * Valid database indexes
27 * Operation-based indexes
28 */
29 define( 'DB_SLAVE', -1 ); # Read from the slave (or only server)
30 define( 'DB_MASTER', -2 ); # Write to master (or only server)
31 define( 'DB_LAST', -3 ); # Whatever database was used last
32 /**@}*/
33
34 # Obsolete aliases
35 define( 'DB_READ', -1 );
36 define( 'DB_WRITE', -2 );
37
38
39 /**@{
40 * Virtual namespaces; don't appear in the page database
41 */
42 define( 'NS_MEDIA', -2 );
43 define( 'NS_SPECIAL', -1 );
44 /**@}*/
45
46 /**@{
47 * Real namespaces
48 *
49 * Number 100 and beyond are reserved for custom namespaces;
50 * DO NOT assign standard namespaces at 100 or beyond.
51 * DO NOT Change integer values as they are most probably hardcoded everywhere
52 * see bug #696 which talked about that.
53 */
54 define( 'NS_MAIN', 0 );
55 define( 'NS_TALK', 1 );
56 define( 'NS_USER', 2 );
57 define( 'NS_USER_TALK', 3 );
58 define( 'NS_PROJECT', 4 );
59 define( 'NS_PROJECT_TALK', 5 );
60 define( 'NS_FILE', 6 );
61 define( 'NS_FILE_TALK', 7 );
62 define( 'NS_MEDIAWIKI', 8 );
63 define( 'NS_MEDIAWIKI_TALK', 9 );
64 define( 'NS_TEMPLATE', 10 );
65 define( 'NS_TEMPLATE_TALK', 11 );
66 define( 'NS_HELP', 12 );
67 define( 'NS_HELP_TALK', 13 );
68 define( 'NS_CATEGORY', 14 );
69 define( 'NS_CATEGORY_TALK', 15 );
70
71 /**
72 * NS_IMAGE and NS_IMAGE_TALK are the pre-v1.14 names for NS_FILE and
73 * NS_FILE_TALK respectively, and are kept for compatibility.
74 *
75 * When writing code that should be compatible with older MediaWiki
76 * versions, either stick to the old names or define the new constants
77 * yourself, if they're not defined already.
78 */
79 define( 'NS_IMAGE', NS_FILE );
80 define( 'NS_IMAGE_TALK', NS_FILE_TALK );
81 /**@}*/
82
83 /**
84 * Available feeds objects
85 * Should probably only be defined when a page is syndicated ie when
86 * $wgOut->isSyndicated() is true
87 */
88 $wgFeedClasses = array(
89 'rss' => 'RSSFeed',
90 'atom' => 'AtomFeed',
91 );
92
93 /**@{
94 * Maths constants
95 */
96 define( 'MW_MATH_PNG', 0 );
97 define( 'MW_MATH_SIMPLE', 1 );
98 define( 'MW_MATH_HTML', 2 );
99 define( 'MW_MATH_SOURCE', 3 );
100 define( 'MW_MATH_MODERN', 4 );
101 define( 'MW_MATH_MATHML', 5 );
102 /**@}*/
103
104 /**@{
105 * Cache type
106 */
107 define( 'CACHE_ANYTHING', -1 ); // Use anything, as long as it works
108 define( 'CACHE_NONE', 0 ); // Do not cache
109 define( 'CACHE_DB', 1 ); // Store cache objects in the DB
110 define( 'CACHE_MEMCACHED', 2 ); // MemCached, must specify servers in $wgMemCacheServers
111 define( 'CACHE_ACCEL', 3 ); // eAccelerator
112 define( 'CACHE_DBA', 4 ); // Use PHP's DBA extension to store in a DBM-style database
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 define( 'MEDIATYPE_DATA', 'DATA' ); // A generic data file (like kml and kmz)
130 /**@}*/
131
132 /**@{
133 * Antivirus result codes, for use in $wgAntivirusSetup.
134 */
135 define( 'AV_NO_VIRUS', 0 ); #scan ok, no virus found
136 define( 'AV_VIRUS_FOUND', 1 ); #virus found!
137 define( 'AV_SCAN_ABORTED', -1 ); #scan aborted, the file is probably imune
138 define( 'AV_SCAN_FAILED', false ); #scan failed (scanner not found or error in scanner)
139 /**@}*/
140
141 /**@{
142 * Anti-lock flags
143 * See DefaultSettings.php for a description
144 */
145 define( 'ALF_PRELOAD_LINKS', 1 );
146 define( 'ALF_PRELOAD_EXISTENCE', 2 );
147 define( 'ALF_NO_LINK_LOCK', 4 );
148 define( 'ALF_NO_BLOCK_LOCK', 8 );
149 /**@}*/
150
151 /**@{
152 * Date format selectors; used in user preference storage and by
153 * Language::date() and co.
154 */
155 /*define( 'MW_DATE_DEFAULT', '0' );
156 define( 'MW_DATE_MDY', '1' );
157 define( 'MW_DATE_DMY', '2' );
158 define( 'MW_DATE_YMD', '3' );
159 define( 'MW_DATE_ISO', 'ISO 8601' );*/
160 define( 'MW_DATE_DEFAULT', 'default' );
161 define( 'MW_DATE_MDY', 'mdy' );
162 define( 'MW_DATE_DMY', 'dmy' );
163 define( 'MW_DATE_YMD', 'ymd' );
164 define( 'MW_DATE_ISO', 'ISO 8601' );
165 /**@}*/
166
167 /**@{
168 * RecentChange type identifiers
169 * This may be obsolete; log items are now used for moves?
170 */
171 define( 'RC_EDIT', 0);
172 define( 'RC_NEW', 1);
173 define( 'RC_MOVE', 2);
174 define( 'RC_LOG', 3);
175 define( 'RC_MOVE_OVER_REDIRECT', 4);
176 /**@}*/
177
178 /**@{
179 * Article edit flags
180 */
181 define( 'EDIT_NEW', 1 );
182 define( 'EDIT_UPDATE', 2 );
183 define( 'EDIT_MINOR', 4 );
184 define( 'EDIT_SUPPRESS_RC', 8 );
185 define( 'EDIT_FORCE_BOT', 16 );
186 define( 'EDIT_DEFER_UPDATES', 32 );
187 define( 'EDIT_AUTOSUMMARY', 64 );
188 /**@}*/
189
190 /**@{
191 * Flags for Database::makeList()
192 * These are also available as Database class constants
193 */
194 define( 'LIST_COMMA', 0 );
195 define( 'LIST_AND', 1 );
196 define( 'LIST_SET', 2 );
197 define( 'LIST_NAMES', 3);
198 define( 'LIST_OR', 4);
199 define( 'LIST_SET_PREPARED', 8); // List of (?, ?, ?) for DatabaseIbm_db2
200 /**@}*/
201
202 /**
203 * Unicode and normalisation related
204 */
205 require_once dirname(__FILE__).'/normal/UtfNormalDefines.php';
206
207 /**@{
208 * Hook support constants
209 */
210 define( 'MW_SUPPORTS_EDITFILTERMERGED', 1 );
211 define( 'MW_SUPPORTS_PARSERFIRSTCALLINIT', 1 );
212 define( 'MW_SUPPORTS_LOCALISATIONCACHE', 1 );
213 /**@}*/
214
215 /** Support for $wgResourceModules */
216 define( 'MW_SUPPORTS_RESOURCE_MODULES', 1 );
217
218 /**@{
219 * Allowed values for Parser::$mOutputType
220 * Parameter to Parser::startExternalParse().
221 */
222 define( 'OT_HTML', 1 );
223 define( 'OT_WIKI', 2 );
224 define( 'OT_PREPROCESS', 3 );
225 define( 'OT_MSG' , 3 ); // b/c alias for OT_PREPROCESS
226 define( 'OT_PLAIN', 4 );
227 /**@}*/
228
229 /**@{
230 * Flags for Parser::setFunctionHook
231 */
232 define( 'SFH_NO_HASH', 1 );
233 define( 'SFH_OBJECT_ARGS', 2 );
234 /**@}*/
235
236 /**
237 * Flags for Parser::setLinkHook
238 */
239 define( 'SLH_PATTERN', 1 );
240
241 /**
242 * Flags for Parser::replaceLinkHolders
243 */
244 define( 'RLH_FOR_UPDATE', 1 );
245
246 /**@{
247 * Autopromote conditions (must be here and not in Autopromote.php, so that
248 * they're loaded for DefaultSettings.php before AutoLoader.php)
249 */
250 define( 'APCOND_EDITCOUNT', 1 );
251 define( 'APCOND_AGE', 2 );
252 define( 'APCOND_EMAILCONFIRMED', 3 );
253 define( 'APCOND_INGROUPS', 4 );
254 define( 'APCOND_ISIP', 5 );
255 define( 'APCOND_IPINRANGE', 6 );
256 define( 'APCOND_AGE_FROM_EDIT', 7 );
257 define( 'APCOND_BLOCKED', 8 );
258 /**@}*/