MediaWiki REL1_33
Defines.php
Go to the documentation of this file.
1<?php
23require_once __DIR__ . '/libs/mime/defines.php';
24require_once __DIR__ . '/libs/rdbms/defines.php';
25
27
39define( 'MW_VERSION', '1.33.4' );
40
41# Obsolete aliases
45define( 'DB_SLAVE', -1 );
46
51define( 'LIST_COMMA', IDatabase::LIST_COMMA );
52define( 'LIST_AND', IDatabase::LIST_AND );
53define( 'LIST_SET', IDatabase::LIST_SET );
54define( 'LIST_NAMES', IDatabase::LIST_NAMES );
55define( 'LIST_OR', IDatabase::LIST_OR );
61define( 'NS_MEDIA', -2 );
62define( 'NS_SPECIAL', -1 );
73define( 'NS_MAIN', 0 );
74define( 'NS_TALK', 1 );
75define( 'NS_USER', 2 );
76define( 'NS_USER_TALK', 3 );
77define( 'NS_PROJECT', 4 );
78define( 'NS_PROJECT_TALK', 5 );
79define( 'NS_FILE', 6 );
80define( 'NS_FILE_TALK', 7 );
81define( 'NS_MEDIAWIKI', 8 );
82define( 'NS_MEDIAWIKI_TALK', 9 );
83define( 'NS_TEMPLATE', 10 );
84define( 'NS_TEMPLATE_TALK', 11 );
85define( 'NS_HELP', 12 );
86define( 'NS_HELP_TALK', 13 );
87define( 'NS_CATEGORY', 14 );
88define( 'NS_CATEGORY_TALK', 15 );
89
100define( 'NS_IMAGE', NS_FILE );
104define( 'NS_IMAGE_TALK', NS_FILE_TALK );
110define( 'CACHE_ANYTHING', -1 ); // Use anything, as long as it works
111define( 'CACHE_NONE', 0 ); // Do not cache
112define( 'CACHE_DB', 1 ); // Store cache objects in the DB
113define( 'CACHE_MEMCACHED', 2 ); // MemCached, must specify servers in $wgMemCacheServers
114define( 'CACHE_ACCEL', 3 ); // APC or WinCache
120define( 'AV_NO_VIRUS', 0 ); # scan ok, no virus found
121define( 'AV_VIRUS_FOUND', 1 ); # virus found!
122define( 'AV_SCAN_ABORTED', -1 ); # scan aborted, the file is probably immune
123define( 'AV_SCAN_FAILED', false ); # scan failed (scanner not found or error in scanner)
131define( 'ALF_PRELOAD_LINKS', 1 ); // unused
132define( 'ALF_PRELOAD_EXISTENCE', 2 ); // unused
133define( 'ALF_NO_LINK_LOCK', 4 ); // unused
134define( 'ALF_NO_BLOCK_LOCK', 8 ); // unused
141define( 'MW_DATE_DEFAULT', 'default' );
142define( 'MW_DATE_MDY', 'mdy' );
143define( 'MW_DATE_DMY', 'dmy' );
144define( 'MW_DATE_YMD', 'ymd' );
145define( 'MW_DATE_ISO', 'ISO 8601' );
151define( 'RC_EDIT', 0 );
152define( 'RC_NEW', 1 );
153define( 'RC_LOG', 3 );
154define( 'RC_EXTERNAL', 5 );
155define( 'RC_CATEGORIZE', 6 );
161define( 'EDIT_NEW', 1 );
162define( 'EDIT_UPDATE', 2 );
163define( 'EDIT_MINOR', 4 );
164define( 'EDIT_SUPPRESS_RC', 8 );
165define( 'EDIT_FORCE_BOT', 16 );
166define( 'EDIT_DEFER_UPDATES', 32 ); // Unused since 1.27
167define( 'EDIT_AUTOSUMMARY', 64 );
168define( 'EDIT_INTERNAL', 128 );
182
193define( 'OT_HTML', 1 );
194define( 'OT_WIKI', 2 );
195define( 'OT_PREPROCESS', 3 );
196define( 'OT_MSG', 3 ); // b/c alias for OT_PREPROCESS
197define( 'OT_PLAIN', 4 );
206define( 'SFH_NO_HASH', 1 );
207define( 'SFH_OBJECT_ARGS', 2 );
214define( 'APCOND_EDITCOUNT', 1 );
215define( 'APCOND_AGE', 2 );
217define( 'APCOND_INGROUPS', 4 );
218define( 'APCOND_ISIP', 5 );
219define( 'APCOND_IPINRANGE', 6 );
220define( 'APCOND_AGE_FROM_EDIT', 7 );
221define( 'APCOND_BLOCKED', 8 );
222define( 'APCOND_ISBOT', 9 );
228define( 'PROTO_HTTP', 'http://' );
229define( 'PROTO_HTTPS', 'https://' );
230define( 'PROTO_RELATIVE', '//' );
231define( 'PROTO_CURRENT', null );
232define( 'PROTO_CANONICAL', 1 );
233define( 'PROTO_INTERNAL', 2 );
244define( 'CONTENT_MODEL_WIKITEXT', 'wikitext' );
245define( 'CONTENT_MODEL_JAVASCRIPT', 'javascript' );
246define( 'CONTENT_MODEL_CSS', 'css' );
247define( 'CONTENT_MODEL_TEXT', 'text' );
258// wikitext
259define( 'CONTENT_FORMAT_WIKITEXT', 'text/x-wiki' );
260// for js pages
261define( 'CONTENT_FORMAT_JAVASCRIPT', 'text/javascript' );
262// for css pages
263define( 'CONTENT_FORMAT_CSS', 'text/css' );
264// for future use, e.g. with some plain-html messages.
265define( 'CONTENT_FORMAT_TEXT', 'text/plain' );
266// for future use, e.g. with some plain-html messages.
267define( 'CONTENT_FORMAT_HTML', 'text/html' );
268// for future use with the api and for extensions
269define( 'CONTENT_FORMAT_SERIALIZED', 'application/vnd.php.serialized' );
270// for future use with the api, and for use by extensions
271define( 'CONTENT_FORMAT_JSON', 'application/json' );
272// for future use with the api, and for use by extensions
273define( 'CONTENT_FORMAT_XML', 'application/xml' );
279define( 'SHELL_MAX_ARG_STRLEN', '100000' );
293define( 'SCHEMA_COMPAT_WRITE_OLD', 0x01 );
294define( 'SCHEMA_COMPAT_READ_OLD', 0x02 );
295define( 'SCHEMA_COMPAT_WRITE_NEW', 0x10 );
296define( 'SCHEMA_COMPAT_READ_NEW', 0x20 );
324define( 'MIGRATION_OLD', 0x00000000 | SCHEMA_COMPAT_OLD );
327define( 'MIGRATION_NEW', 0x30000000 | SCHEMA_COMPAT_NEW );
337define( 'XML_DUMP_SCHEMA_VERSION_10', '0.10' );
Apache License January http
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
const MW_SUPPORTS_RESOURCE_MODULES
Support for $wgResourceModules.
Definition Defines.php:181
The package json
Definition README.txt:1
const SCHEMA_COMPAT_WRITE_BOTH
Definition Defines.php:297
const APCOND_BLOCKED
Definition Defines.php:221
const CONTENT_FORMAT_JAVASCRIPT
Definition Defines.php:261
const SCHEMA_COMPAT_OLD
Definition Defines.php:299
const OT_WIKI
Definition Defines.php:194
const SFH_NO_HASH
Definition Defines.php:206
const ALF_PRELOAD_LINKS
Definition Defines.php:131
const CONTENT_FORMAT_HTML
Definition Defines.php:267
const CONTENT_FORMAT_JSON
Definition Defines.php:271
const SCHEMA_COMPAT_READ_NEW
Definition Defines.php:296
const PROTO_CANONICAL
Definition Defines.php:232
const EDIT_FORCE_BOT
Definition Defines.php:165
const APCOND_AGE
Definition Defines.php:215
const ALF_NO_BLOCK_LOCK
Definition Defines.php:134
const ALF_PRELOAD_EXISTENCE
Definition Defines.php:132
const APCOND_EMAILCONFIRMED
Definition Defines.php:216
const SCHEMA_COMPAT_READ_BOTH
Definition Defines.php:298
const SFH_OBJECT_ARGS
Definition Defines.php:207
const EDIT_DEFER_UPDATES
Definition Defines.php:166
const EDIT_INTERNAL
Definition Defines.php:168
const EDIT_UPDATE
Definition Defines.php:162
const PROTO_HTTPS
Definition Defines.php:229
const SCHEMA_COMPAT_WRITE_OLD
Definition Defines.php:293
const APCOND_IPINRANGE
Definition Defines.php:219
const MW_SUPPORTS_CONTENTHANDLER
Definition Defines.php:176
const CONTENT_MODEL_CSS
Definition Defines.php:246
const APCOND_INGROUPS
Definition Defines.php:217
const NS_FILE
Definition Defines.php:79
const RC_NEW
Definition Defines.php:152
const PROTO_CURRENT
Definition Defines.php:231
const MW_EDITFILTERMERGED_SUPPORTS_API
Definition Defines.php:177
const PROTO_INTERNAL
Definition Defines.php:233
const CONTENT_FORMAT_TEXT
Definition Defines.php:265
const APCOND_ISBOT
Definition Defines.php:222
const APCOND_AGE_FROM_EDIT
Definition Defines.php:220
const NS_FILE_TALK
Definition Defines.php:80
const EDIT_SUPPRESS_RC
Definition Defines.php:164
const MW_DATE_MDY
Definition Defines.php:142
const CONTENT_FORMAT_CSS
Definition Defines.php:263
const OT_PLAIN
Definition Defines.php:197
const MW_DATE_DMY
Definition Defines.php:143
const MW_SUPPORTS_LOCALISATIONCACHE
Definition Defines.php:175
const OT_PREPROCESS
Definition Defines.php:195
const APCOND_ISIP
Definition Defines.php:218
const CONTENT_MODEL_WIKITEXT
Definition Defines.php:244
const MIGRATION_WRITE_NEW
Definition Defines.php:326
const SCHEMA_COMPAT_READ_OLD
Definition Defines.php:294
const XML_DUMP_SCHEMA_VERSION_10
Definition Defines.php:337
const CONTENT_MODEL_JSON
Definition Defines.php:248
const MIGRATION_NEW
Definition Defines.php:327
const RC_LOG
Definition Defines.php:153
const RC_EXTERNAL
Definition Defines.php:154
const MW_DATE_YMD
Definition Defines.php:144
const CONTENT_FORMAT_WIKITEXT
Definition Defines.php:259
const PROTO_HTTP
Definition Defines.php:228
const OT_HTML
Definition Defines.php:193
const CONTENT_MODEL_TEXT
Definition Defines.php:247
const SCHEMA_COMPAT_WRITE_NEW
Definition Defines.php:295
const SHELL_MAX_ARG_STRLEN
Definition Defines.php:279
const APCOND_EDITCOUNT
Definition Defines.php:214
const MW_DATE_ISO
Definition Defines.php:145
const PROTO_RELATIVE
Definition Defines.php:230
const MW_DATE_DEFAULT
Definition Defines.php:141
const SCHEMA_COMPAT_NEW
Definition Defines.php:300
const CONTENT_FORMAT_SERIALIZED
Definition Defines.php:269
const MIGRATION_WRITE_BOTH
Definition Defines.php:325
const RC_EDIT
Definition Defines.php:151
const MIGRATION_OLD
Definition Defines.php:324
const MW_SUPPORTS_PARSERFIRSTCALLINIT
Definition Defines.php:174
const EDIT_MINOR
Definition Defines.php:163
const CONTENT_FORMAT_XML
Definition Defines.php:273
const CONTENT_MODEL_JAVASCRIPT
Definition Defines.php:245
const EDIT_AUTOSUMMARY
Definition Defines.php:167
const ALF_NO_LINK_LOCK
Definition Defines.php:133
const OT_MSG
Definition Defines.php:196
const EDIT_NEW
Definition Defines.php:161
const RC_CATEGORIZE
Definition Defines.php:155
either a plain
Definition hooks.txt:2054
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not null
Definition hooks.txt:783
Using a hook running we can avoid having all this option specific stuff in our mainline code Using the function We ve cleaned up the code here by removing clumps of infrequently used code and moving them off somewhere else It s much easier for someone working with this code to see what s _really_ going and make changes or fix bugs In we can take all the code that deals with the little used title reversing we can concentrate it all in an extension file
Definition hooks.txt:106
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition injection.txt:37
Basic database interface for live and lazy-loaded relation database handles.
Definition IDatabase.php:38
This document provides an overview of the usage of PageUpdater and that is