MediaWiki master
Defines.php
Go to the documentation of this file.
1<?php
9require_once __DIR__ . '/libs/Mime/defines.php';
10require_once __DIR__ . '/libs/Rdbms/defines.php';
11
13
23define( 'MW_VERSION', '1.46.0-alpha' );
24
29define( 'LIST_COMMA', IDatabase::LIST_COMMA );
30define( 'LIST_AND', IDatabase::LIST_AND );
31define( 'LIST_SET', IDatabase::LIST_SET );
32define( 'LIST_NAMES', IDatabase::LIST_NAMES );
33define( 'LIST_OR', IDatabase::LIST_OR );
39define( 'NS_MEDIA', -2 );
40define( 'NS_SPECIAL', -1 );
51define( 'NS_MAIN', 0 );
52define( 'NS_TALK', 1 );
53define( 'NS_USER', 2 );
54define( 'NS_USER_TALK', 3 );
55define( 'NS_PROJECT', 4 );
56define( 'NS_PROJECT_TALK', 5 );
57define( 'NS_FILE', 6 );
58define( 'NS_FILE_TALK', 7 );
59define( 'NS_MEDIAWIKI', 8 );
60define( 'NS_MEDIAWIKI_TALK', 9 );
61define( 'NS_TEMPLATE', 10 );
62define( 'NS_TEMPLATE_TALK', 11 );
63define( 'NS_HELP', 12 );
64define( 'NS_HELP_TALK', 13 );
65define( 'NS_CATEGORY', 14 );
66define( 'NS_CATEGORY_TALK', 15 );
72define( 'CACHE_ANYTHING', -1 ); // Use anything, as long as it works
73define( 'CACHE_NONE', 0 ); // Do not cache
74define( 'CACHE_DB', 1 ); // Store cache objects in the DB
75define( 'CACHE_MEMCACHED', 'memcached-php' ); // Backwards-compatability alias for Memcached
76define( 'CACHE_ACCEL', 3 ); // APC or APCu
77define( 'CACHE_HASH', 'hash' ); // A HashBagOStuff, mostly useful for testing. Not configurable
83define( 'AV_NO_VIRUS', 0 ); # scan ok, no virus found
84define( 'AV_VIRUS_FOUND', 1 ); # virus found!
85define( 'AV_SCAN_ABORTED', -1 ); # scan aborted, the file is probably immune
86define( 'AV_SCAN_FAILED', false ); # scan failed (scanner not found or error in scanner)
93define( 'MW_DATE_DEFAULT', 'default' );
94define( 'MW_DATE_MDY', 'mdy' );
95define( 'MW_DATE_DMY', 'dmy' );
96define( 'MW_DATE_YMD', 'ymd' );
97define( 'MW_DATE_ISO', 'ISO 8601' );
103define( 'RC_EDIT', 0 );
104define( 'RC_NEW', 1 );
105define( 'RC_LOG', 3 );
106define( 'RC_EXTERNAL', 5 );
107define( 'RC_CATEGORIZE', 6 );
114define( 'EDIT_NEW', 1 );
115
117define( 'EDIT_UPDATE', 2 );
118
120define( 'EDIT_MINOR', 4 );
121
123define( 'EDIT_SILENT', 8 );
124
127
129define( 'EDIT_FORCE_BOT', 16 );
130
132define( 'EDIT_DEFER_UPDATES', 32 );
133
135define( 'EDIT_AUTOSUMMARY', 64 );
136
138define( 'EDIT_INTERNAL', 128 );
139
141define( 'EDIT_IMPLICIT', 256 );
155
161
171define( 'OT_HTML', 1 );
172define( 'OT_WIKI', 2 );
173define( 'OT_PREPROCESS', 3 );
174define( 'OT_PLAIN', 4 );
183define( 'SFH_NO_HASH', 1 );
184define( 'SFH_OBJECT_ARGS', 2 );
190define( 'APCOND_EDITCOUNT', 1 );
191define( 'APCOND_AGE', 2 );
193define( 'APCOND_INGROUPS', 4 );
194define( 'APCOND_ISIP', 5 );
195define( 'APCOND_IPINRANGE', 6 );
196define( 'APCOND_AGE_FROM_EDIT', 7 );
197define( 'APCOND_BLOCKED', 8 );
198define( 'APCOND_ISBOT', 9 );
207define( 'CUDCOND_AFTER', 'registered-after' );
208define( 'CUDCOND_ANON', 'anonymous-user' );
209define( 'CUDCOND_NAMED', 'named-user' );
210define( 'CUDCOND_USERGROUP', 'usergroup' );
217define( 'PROTO_HTTP', 'http://' );
218define( 'PROTO_HTTPS', 'https://' );
219define( 'PROTO_RELATIVE', '//' );
220define( 'PROTO_FALLBACK', null );
221// Legacy alias for PROTO_FALLBACK from when the current request's protocol was always the fallback
223define( 'PROTO_CANONICAL', 1 );
224define( 'PROTO_INTERNAL', 2 );
235define( 'CONTENT_MODEL_WIKITEXT', 'wikitext' );
236define( 'CONTENT_MODEL_JAVASCRIPT', 'javascript' );
237define( 'CONTENT_MODEL_CSS', 'css' );
238define( 'CONTENT_MODEL_TEXT', 'text' );
239define( 'CONTENT_MODEL_JSON', 'json' );
241define( 'CONTENT_MODEL_VUE', 'vue' );
242define( 'CONTENT_MODEL_UNKNOWN', 'unknown' );
253define( 'CONTENT_FORMAT_WIKITEXT', 'text/x-wiki' );
255define( 'CONTENT_FORMAT_JAVASCRIPT', 'text/javascript' );
257define( 'CONTENT_FORMAT_CSS', 'text/css' );
259define( 'CONTENT_FORMAT_VUE', 'application/vue+xml' );
261define( 'CONTENT_FORMAT_TEXT', 'text/plain' );
263define( 'CONTENT_FORMAT_HTML', 'text/html' );
265define( 'CONTENT_FORMAT_SERIALIZED', 'application/vnd.php.serialized' );
267define( 'CONTENT_FORMAT_JSON', 'application/json' );
269define( 'CONTENT_FORMAT_XML', 'application/xml' );
275define( 'SHELL_MAX_ARG_STRLEN', '100000' );
293define( 'SCHEMA_COMPAT_WRITE_OLD', 0x01 );
294define( 'SCHEMA_COMPAT_READ_OLD', 0x02 );
295define( 'SCHEMA_COMPAT_WRITE_TEMP', 0x10 );
296define( 'SCHEMA_COMPAT_READ_TEMP', 0x20 );
297define( 'SCHEMA_COMPAT_WRITE_NEW', 0x100 );
298define( 'SCHEMA_COMPAT_READ_NEW', 0x200 );
337define( 'MIGRATION_OLD', 0x00000000 | SCHEMA_COMPAT_OLD );
340define( 'MIGRATION_NEW', 0x30000000 | SCHEMA_COMPAT_NEW );
350define( 'XML_DUMP_SCHEMA_VERSION_10', '0.10' );
351define( 'XML_DUMP_SCHEMA_VERSION_11', '0.11' );
const SCHEMA_COMPAT_WRITE_BOTH
Definition Defines.php:301
const APCOND_BLOCKED
Definition Defines.php:197
const CUDCOND_NAMED
Definition Defines.php:209
const CONTENT_FORMAT_JAVASCRIPT
For JS pages.
Definition Defines.php:255
const SCHEMA_COMPAT_OLD
Definition Defines.php:305
const OT_WIKI
Definition Defines.php:172
const SFH_NO_HASH
Definition Defines.php:183
const CONTENT_FORMAT_HTML
For future use, e.g.
Definition Defines.php:263
const SCHEMA_COMPAT_WRITE_TEMP
Definition Defines.php:295
const CONTENT_FORMAT_JSON
For future use with the API, and for use by extensions.
Definition Defines.php:267
const SCHEMA_COMPAT_READ_NEW
Definition Defines.php:298
const PROTO_CANONICAL
Definition Defines.php:223
const EDIT_FORCE_BOT
Mark the edit a "bot" edit regardless of user rights.
Definition Defines.php:129
const APCOND_AGE
Definition Defines.php:191
const CONTENT_MODEL_VUE
Definition Defines.php:241
const APCOND_EMAILCONFIRMED
Definition Defines.php:192
const SCHEMA_COMPAT_READ_BOTH
Definition Defines.php:304
const SFH_OBJECT_ARGS
Definition Defines.php:184
const SCHEMA_COMPAT_WRITE_TEMP_AND_NEW
Definition Defines.php:303
const EDIT_DEFER_UPDATES
Definition Defines.php:132
const EDIT_INTERNAL
Signal that the page retrieve/save cycle happened entirely in this request.
Definition Defines.php:138
const EDIT_UPDATE
Article is assumed to be pre-existing, fail if it doesn't exist.
Definition Defines.php:117
const PROTO_HTTPS
Definition Defines.php:218
const SCHEMA_COMPAT_WRITE_OLD
Definition Defines.php:293
const APCOND_IPINRANGE
Definition Defines.php:195
const MW_SUPPORTS_CONTENTHANDLER
Definition Defines.php:149
const CONTENT_MODEL_CSS
Definition Defines.php:237
const CUDCOND_AFTER
Definition Defines.php:207
const APCOND_INGROUPS
Definition Defines.php:193
const RC_NEW
Definition Defines.php:104
const PROTO_CURRENT
Definition Defines.php:222
const MW_EDITFILTERMERGED_SUPPORTS_API
Definition Defines.php:150
const PROTO_INTERNAL
Definition Defines.php:224
const CONTENT_FORMAT_TEXT
For future use, e.g.
Definition Defines.php:261
const APCOND_ISBOT
Definition Defines.php:198
const APCOND_AGE_FROM_EDIT
Definition Defines.php:196
const EDIT_SUPPRESS_RC
Definition Defines.php:126
const MW_DATE_MDY
Definition Defines.php:94
const CONTENT_FORMAT_CSS
For CSS pages.
Definition Defines.php:257
const SCHEMA_COMPAT_WRITE_OLD_AND_TEMP
Definition Defines.php:302
const XML_DUMP_SCHEMA_VERSION_11
Definition Defines.php:349
const SCHEMA_COMPAT_READ_TEMP
Definition Defines.php:296
const OT_PLAIN
Definition Defines.php:174
const MW_DATE_DMY
Definition Defines.php:95
const PROTO_FALLBACK
Definition Defines.php:220
const MW_SUPPORTS_LOCALISATIONCACHE
Definition Defines.php:148
const OT_PREPROCESS
Definition Defines.php:173
const APCOND_ISIP
Definition Defines.php:194
const MW_HAS_SPECIAL_INTERWIKI
Indicate that the Interwiki extension should not be loaded (it is now in core).
Definition Defines.php:160
const CONTENT_MODEL_WIKITEXT
Definition Defines.php:235
const MIGRATION_WRITE_NEW
Definition Defines.php:337
const SCHEMA_COMPAT_READ_OLD
Definition Defines.php:294
const XML_DUMP_SCHEMA_VERSION_10
Definition Defines.php:348
const CONTENT_MODEL_JSON
Definition Defines.php:239
const MIGRATION_NEW
Definition Defines.php:338
const RC_LOG
Definition Defines.php:105
const RC_EXTERNAL
Definition Defines.php:106
const MW_DATE_YMD
Definition Defines.php:96
const CONTENT_FORMAT_WIKITEXT
Wikitext.
Definition Defines.php:253
const PROTO_HTTP
Definition Defines.php:217
const EDIT_IMPLICIT
The edit is a side effect and does not represent an active user contribution.
Definition Defines.php:141
const OT_HTML
Definition Defines.php:171
const MW_SUPPORTS_RESOURCE_MODULES
Support for $wgResourceModules.
Definition Defines.php:154
const CONTENT_MODEL_TEXT
Definition Defines.php:238
const SCHEMA_COMPAT_WRITE_NEW
Definition Defines.php:297
const SHELL_MAX_ARG_STRLEN
Definition Defines.php:275
const SCHEMA_COMPAT_WRITE_MASK
Definition Defines.php:299
const APCOND_EDITCOUNT
Definition Defines.php:190
const MW_DATE_ISO
Definition Defines.php:97
const PROTO_RELATIVE
Definition Defines.php:219
const MW_DATE_DEFAULT
Definition Defines.php:93
const SCHEMA_COMPAT_NEW
Definition Defines.php:307
const CONTENT_FORMAT_SERIALIZED
For future use with the API and for extensions.
Definition Defines.php:265
const MIGRATION_WRITE_BOTH
Definition Defines.php:336
const CUDCOND_USERGROUP
Definition Defines.php:210
const SCHEMA_COMPAT_TEMP
Definition Defines.php:306
const RC_EDIT
Definition Defines.php:103
const MIGRATION_OLD
Definition Defines.php:335
const CONTENT_MODEL_UNKNOWN
Definition Defines.php:242
const MW_SUPPORTS_PARSERFIRSTCALLINIT
Definition Defines.php:147
const EDIT_SILENT
Do not notify other users (e.g.
Definition Defines.php:123
const EDIT_MINOR
Mark this edit minor, if the user is allowed to do so.
Definition Defines.php:120
const CONTENT_FORMAT_XML
For future use with the API, and for use by extensions.
Definition Defines.php:269
const CONTENT_FORMAT_VUE
For Vue pages.
Definition Defines.php:259
const SCHEMA_COMPAT_READ_MASK
Definition Defines.php:300
const CONTENT_MODEL_JAVASCRIPT
Definition Defines.php:236
const EDIT_AUTOSUMMARY
Fill in blank summaries with generated text where possible.
Definition Defines.php:135
const CUDCOND_ANON
Definition Defines.php:208
const EDIT_NEW
Article is assumed to be non-existent, fail if it exists.
Definition Defines.php:114
const RC_CATEGORIZE
Definition Defines.php:107
Interface to a relational database.
Definition IDatabase.php:31