3 * A few constants that might be needed during LocalSettings.php
8 * Version constants for the benefit of extensions
10 define( 'MW_SPECIALPAGE_VERSION', 2 );
13 * Database related constants
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 );
23 # Valid database indexes
24 # Operation-based indexes
25 define( 'DB_SLAVE', -1 ); # Read from the slave (or only server)
26 define( 'DB_MASTER', -2 ); # Write to master (or only server)
27 define( 'DB_LAST', -3 ); # Whatever database was used last
30 define( 'DB_READ', -1 );
31 define( 'DB_WRITE', -2 );
35 * Virtual namespaces; don't appear in the page database
37 define('NS_MEDIA', -2);
38 define('NS_SPECIAL', -1);
44 * Number 100 and beyond are reserved for custom namespaces;
45 * DO NOT assign standard namespaces at 100 or beyond.
46 * DO NOT Change integer values as they are most probably hardcoded everywhere
47 * see bug #696 which talked about that.
52 define('NS_USER_TALK', 3);
53 define('NS_PROJECT', 4);
54 define('NS_PROJECT_TALK', 5);
55 define('NS_IMAGE', 6);
56 define('NS_IMAGE_TALK', 7);
57 define('NS_MEDIAWIKI', 8);
58 define('NS_MEDIAWIKI_TALK', 9);
59 define('NS_TEMPLATE', 10);
60 define('NS_TEMPLATE_TALK', 11);
61 define('NS_HELP', 12);
62 define('NS_HELP_TALK', 13);
63 define('NS_CATEGORY', 14);
64 define('NS_CATEGORY_TALK', 15);
68 * Available feeds objects
69 * Should probably only be defined when a page is syndicated ie when
70 * $wgOut->isSyndicated() is true
72 $wgFeedClasses = array(
80 define( 'MW_MATH_PNG', 0 );
81 define( 'MW_MATH_SIMPLE', 1 );
82 define( 'MW_MATH_HTML', 2 );
83 define( 'MW_MATH_SOURCE', 3 );
84 define( 'MW_MATH_MODERN', 4 );
85 define( 'MW_MATH_MATHML', 5 );
92 $wgAvailableRights = array(
115 define( 'CACHE_ANYTHING', -1 ); // Use anything, as long as it works
116 define( 'CACHE_NONE', 0 ); // Do not cache
117 define( 'CACHE_DB', 1 ); // Store cache objects in the DB
118 define( 'CACHE_MEMCACHED', 2 ); // MemCached, must specify servers in $wgMemCacheServers
119 define( 'CACHE_ACCEL', 3 ); // eAccelerator or Turck, whichever is available
120 define( 'CACHE_DBA', 4 ); // Use PHP's DBA extension to store in a DBM-style database
127 * This defines constants for the value returned by Image::getMediaType()
129 define( 'MEDIATYPE_UNKNOWN', 'UNKNOWN' ); // unknown format
130 define( 'MEDIATYPE_BITMAP', 'BITMAP' ); // some bitmap image or image source (like psd, etc). Can't scale up.
131 define( 'MEDIATYPE_DRAWING', 'DRAWING' ); // some vector drawing (SVG, WMF, PS, ...) or image source (oo-draw, etc). Can scale up.
132 define( 'MEDIATYPE_AUDIO', 'AUDIO' ); // simple audio file (ogg, mp3, wav, midi, whatever)
133 define( 'MEDIATYPE_VIDEO', 'VIDEO' ); // simple video file (ogg, mpg, etc; no not include formats here that may contain executable sections or scripts!)
134 define( 'MEDIATYPE_MULTIMEDIA', 'MULTIMEDIA' ); // Scriptable Multimedia (flash, advanced video container formats, etc)
135 define( 'MEDIATYPE_OFFICE', 'OFFICE' ); // Office Documents, Spreadsheets (office formats possibly containing apples, scripts, etc)
136 define( 'MEDIATYPE_TEXT', 'TEXT' ); // Plain text (possibly containing program code or scripts)
137 define( 'MEDIATYPE_EXECUTABLE', 'EXECUTABLE' ); // binary executable
138 define( 'MEDIATYPE_ARCHIVE', 'ARCHIVE' ); // archive file (zip, tar, etc)
142 * Antivirus result codes, for use in $wgAntivirusSetup.
144 define( 'AV_NO_VIRUS', 0 ); #scan ok, no virus found
145 define( 'AV_VIRUS_FOUND', 1 ); #virus found!
146 define( 'AV_SCAN_ABORTED', -1 ); #scan aborted, the file is probably imune
147 define( 'AV_SCAN_FAILED', false ); #scan failed (scanner not found or error in scanner)
152 * See DefaultSettings.php for a description
154 define( 'ALF_PRELOAD_LINKS', 1 );
155 define( 'ALF_PRELOAD_EXISTENCE', 2 );
156 define( 'ALF_NO_LINK_LOCK', 4 );
157 define( 'ALF_NO_BLOCK_LOCK', 8 );
161 * Date format selectors; used in user preference storage and by
162 * Language::date() and co.
164 /*define( 'MW_DATE_DEFAULT', '0' );
165 define( 'MW_DATE_MDY', '1' );
166 define( 'MW_DATE_DMY', '2' );
167 define( 'MW_DATE_YMD', '3' );
168 define( 'MW_DATE_ISO', 'ISO 8601' );*/
169 define( 'MW_DATE_DEFAULT', 'default' );
170 define( 'MW_DATE_MDY', 'mdy' );
171 define( 'MW_DATE_DMY', 'dmy' );
172 define( 'MW_DATE_YMD', 'ymd' );
173 define( 'MW_DATE_ISO', 'ISO 8601' );
177 * RecentChange type identifiers
178 * This may be obsolete; log items are now used for moves?
180 define( 'RC_EDIT', 0);
181 define( 'RC_NEW', 1);
182 define( 'RC_MOVE', 2);
183 define( 'RC_LOG', 3);
184 define( 'RC_MOVE_OVER_REDIRECT', 4);
190 define( 'EDIT_NEW', 1 );
191 define( 'EDIT_UPDATE', 2 );
192 define( 'EDIT_MINOR', 4 );
193 define( 'EDIT_SUPPRESS_RC', 8 );
194 define( 'EDIT_FORCE_BOT', 16 );
195 define( 'EDIT_DEFER_UPDATES', 32 );
196 define( 'EDIT_AUTOSUMMARY', 64 );
200 * Flags for Database::makeList()
201 * These are also available as Database class constants
203 define( 'LIST_COMMA', 0 );
204 define( 'LIST_AND', 1 );
205 define( 'LIST_SET', 2 );
206 define( 'LIST_NAMES', 3);
207 define( 'LIST_OR', 4);