(bug 7098) Add an option to disable/enable sending of HTTP ETag headers,
[lhc/web/wiklou.git] / includes / Defines.php
1 <?php
2 /**
3 * A few constants that might be needed during LocalSettings.php
4 * @package MediaWiki
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 /**#@-*/
22
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
28
29 # Obsolete aliases
30 define( 'DB_READ', -1 );
31 define( 'DB_WRITE', -2 );
32
33
34 /**#@+
35 * Virtual namespaces; don't appear in the page database
36 */
37 define('NS_MEDIA', -2);
38 define('NS_SPECIAL', -1);
39 /**#@-*/
40
41 /**#@+
42 * Real namespaces
43 *
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.
48 */
49 define('NS_MAIN', 0);
50 define('NS_TALK', 1);
51 define('NS_USER', 2);
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);
65 /**#@-*/
66
67 /**
68 * Available feeds objects
69 * Should probably only be defined when a page is syndicated ie when
70 * $wgOut->isSyndicated() is true
71 */
72 $wgFeedClasses = array(
73 'rss' => 'RSSFeed',
74 'atom' => 'AtomFeed',
75 );
76
77 /**#@+
78 * Maths constants
79 */
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 );
86 /**#@-*/
87
88 /**
89 * User rights list
90 * @deprecated
91 */
92 $wgAvailableRights = array(
93 'block',
94 'bot',
95 'createaccount',
96 'delete',
97 'edit',
98 'editinterface',
99 'import',
100 'importupload',
101 'move',
102 'patrol',
103 'protect',
104 'read',
105 'rollback',
106 'siteadmin',
107 'unwatchedpages',
108 'upload',
109 'userrights',
110 );
111
112 /**#@+
113 * Cache type
114 */
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
121 /**#@-*/
122
123
124
125 /**#@+
126 * Media types.
127 * This defines constants for the value returned by Image::getMediaType()
128 */
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)
139 /**#@-*/
140
141 /**#@+
142 * Antivirus result codes, for use in $wgAntivirusSetup.
143 */
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)
148 /**#@-*/
149
150 /**#@+
151 * Anti-lock flags
152 * See DefaultSettings.php for a description
153 */
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 );
158 /**#@-*/
159
160 /**#@+
161 * Date format selectors; used in user preference storage and by
162 * Language::date() and co.
163 */
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' );
174 /**#@-*/
175
176 /**#@+
177 * RecentChange type identifiers
178 * This may be obsolete; log items are now used for moves?
179 */
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);
185 /**#@-*/
186
187 /**#@+
188 * Article edit flags
189 */
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 /**#@-*/
197
198 ?>