MediaWiki  1.23.2
Setup.php
Go to the documentation of this file.
1 <?php
31 if ( !defined( 'MEDIAWIKI' ) ) {
32  exit( 1 );
33 }
34 
35 $fname = 'Setup.php';
37 wfProfileIn( $fname . '-defaults' );
38 
39 // Check to see if we are at the file scope
40 if ( !isset( $wgVersion ) ) {
41  echo "Error, Setup.php must be included from the file scope, after DefaultSettings.php\n";
42  die( 1 );
43 }
44 
45 // Set various default paths sensibly...
46 if ( $wgScript === false ) {
47  $wgScript = "$wgScriptPath/index$wgScriptExtension";
48 }
49 if ( $wgLoadScript === false ) {
50  $wgLoadScript = "$wgScriptPath/load$wgScriptExtension";
51 }
52 
53 if ( $wgArticlePath === false ) {
54  if ( $wgUsePathInfo ) {
55  $wgArticlePath = "$wgScript/$1";
56  } else {
57  $wgArticlePath = "$wgScript?title=$1";
58  }
59 }
60 
61 if ( !empty( $wgActionPaths ) && !isset( $wgActionPaths['view'] ) ) {
62  // 'view' is assumed the default action path everywhere in the code
63  // but is rarely filled in $wgActionPaths
65 }
66 
67 if ( $wgStylePath === false ) {
68  $wgStylePath = "$wgScriptPath/skins";
69 }
70 if ( $wgLocalStylePath === false ) {
71  $wgLocalStylePath = "$wgScriptPath/skins";
72 }
73 if ( $wgStyleDirectory === false ) {
74  $wgStyleDirectory = "$IP/skins";
75 }
76 if ( $wgExtensionAssetsPath === false ) {
77  $wgExtensionAssetsPath = "$wgScriptPath/extensions";
78 }
79 
80 if ( $wgLogo === false ) {
81  $wgLogo = "$wgStylePath/common/images/wiki.png";
82 }
83 
84 if ( $wgUploadPath === false ) {
85  $wgUploadPath = "$wgScriptPath/images";
86 }
87 if ( $wgUploadDirectory === false ) {
88  $wgUploadDirectory = "$IP/images";
89 }
90 if ( $wgReadOnlyFile === false ) {
91  $wgReadOnlyFile = "{$wgUploadDirectory}/lock_yBgMBwiR";
92 }
93 if ( $wgFileCacheDirectory === false ) {
94  $wgFileCacheDirectory = "{$wgUploadDirectory}/cache";
95 }
96 if ( $wgDeletedDirectory === false ) {
97  $wgDeletedDirectory = "{$wgUploadDirectory}/deleted";
98 }
99 
100 if ( isset( $wgFileStore['deleted']['directory'] ) ) {
101  $wgDeletedDirectory = $wgFileStore['deleted']['directory'];
102 }
103 
104 if ( isset( $wgFooterIcons['copyright'] )
105  && isset( $wgFooterIcons['copyright']['copyright'] )
106  && $wgFooterIcons['copyright']['copyright'] === array()
107 ) {
108  if ( isset( $wgCopyrightIcon ) && $wgCopyrightIcon ) {
109  $wgFooterIcons['copyright']['copyright'] = $wgCopyrightIcon;
110  } elseif ( $wgRightsIcon || $wgRightsText ) {
111  $wgFooterIcons['copyright']['copyright'] = array(
112  'url' => $wgRightsUrl,
113  'src' => $wgRightsIcon,
114  'alt' => $wgRightsText,
115  );
116  } else {
117  unset( $wgFooterIcons['copyright']['copyright'] );
118  }
119 }
120 
121 if ( isset( $wgFooterIcons['poweredby'] )
122  && isset( $wgFooterIcons['poweredby']['mediawiki'] )
123  && $wgFooterIcons['poweredby']['mediawiki']['src'] === null
124 ) {
125  $wgFooterIcons['poweredby']['mediawiki']['src'] = "$wgStylePath/common/images/poweredby_mediawiki_88x31.png";
126 }
127 
136 
144 
149  'name' => 'fsLockManager',
150  'class' => 'FSLockManager',
151  'lockDirectory' => "{$wgUploadDirectory}/lockdir",
152 );
154  'name' => 'nullLockManager',
155  'class' => 'NullLockManager',
156 );
157 
161 if ( !$wgLocalFileRepo ) {
162  if ( isset( $wgFileStore['deleted']['hash'] ) ) {
163  $deletedHashLevel = $wgFileStore['deleted']['hash'];
164  } else {
165  $deletedHashLevel = $wgHashedUploadDirectory ? 3 : 0;
166  }
167  $wgLocalFileRepo = array(
168  'class' => 'LocalRepo',
169  'name' => 'local',
170  'directory' => $wgUploadDirectory,
171  'scriptDirUrl' => $wgScriptPath,
172  'scriptExtension' => $wgScriptExtension,
173  'url' => $wgUploadBaseUrl ? $wgUploadBaseUrl . $wgUploadPath : $wgUploadPath,
174  'hashLevels' => $wgHashedUploadDirectory ? 2 : 0,
175  'thumbScriptUrl' => $wgThumbnailScriptPath,
176  'transformVia404' => !$wgGenerateThumbnailOnParse,
177  'deletedDir' => $wgDeletedDirectory,
178  'deletedHashLevels' => $deletedHashLevel
179  );
180 }
184 if ( $wgUseSharedUploads ) {
185  if ( $wgSharedUploadDBname ) {
186  $wgForeignFileRepos[] = array(
187  'class' => 'ForeignDBRepo',
188  'name' => 'shared',
189  'directory' => $wgSharedUploadDirectory,
190  'url' => $wgSharedUploadPath,
191  'hashLevels' => $wgHashedSharedUploadDirectory ? 2 : 0,
192  'thumbScriptUrl' => $wgSharedThumbnailScriptPath,
193  'transformVia404' => !$wgGenerateThumbnailOnParse,
194  'dbType' => $wgDBtype,
195  'dbServer' => $wgDBserver,
196  'dbUser' => $wgDBuser,
197  'dbPassword' => $wgDBpassword,
198  'dbName' => $wgSharedUploadDBname,
199  'dbFlags' => ( $wgDebugDumpSql ? DBO_DEBUG : 0 ) | DBO_DEFAULT,
200  'tablePrefix' => $wgSharedUploadDBprefix,
201  'hasSharedCache' => $wgCacheSharedUploads,
202  'descBaseUrl' => $wgRepositoryBaseUrl,
203  'fetchDescription' => $wgFetchCommonsDescriptions,
204  );
205  } else {
206  $wgForeignFileRepos[] = array(
207  'class' => 'FileRepo',
208  'name' => 'shared',
209  'directory' => $wgSharedUploadDirectory,
210  'url' => $wgSharedUploadPath,
211  'hashLevels' => $wgHashedSharedUploadDirectory ? 2 : 0,
212  'thumbScriptUrl' => $wgSharedThumbnailScriptPath,
213  'transformVia404' => !$wgGenerateThumbnailOnParse,
214  'descBaseUrl' => $wgRepositoryBaseUrl,
215  'fetchDescription' => $wgFetchCommonsDescriptions,
216  );
217  }
218 }
219 if ( $wgUseInstantCommons ) {
220  $wgForeignFileRepos[] = array(
221  'class' => 'ForeignAPIRepo',
222  'name' => 'wikimediacommons',
223  'apibase' => WebRequest::detectProtocol() === 'https' ?
224  'https://commons.wikimedia.org/w/api.php' :
225  'http://commons.wikimedia.org/w/api.php',
226  'hashLevels' => 2,
227  'fetchDescription' => true,
228  'descriptionCacheExpiry' => 43200,
229  'apiThumbCacheExpiry' => 86400,
230  );
231 }
232 /*
233  * Add on default file backend config for file repos.
234  * FileBackendGroup will handle initializing the backends.
235  */
236 if ( !isset( $wgLocalFileRepo['backend'] ) ) {
237  $wgLocalFileRepo['backend'] = $wgLocalFileRepo['name'] . '-backend';
238 }
239 foreach ( $wgForeignFileRepos as &$repo ) {
240  if ( !isset( $repo['directory'] ) && $repo['class'] === 'ForeignAPIRepo' ) {
241  $repo['directory'] = $wgUploadDirectory; // b/c
242  }
243  if ( !isset( $repo['backend'] ) ) {
244  $repo['backend'] = $repo['name'] . '-backend';
245  }
246 }
247 unset( $repo ); // no global pollution; destroy reference
248 
249 if ( $wgRCFilterByAge ) {
250  // Trim down $wgRCLinkDays so that it only lists links which are valid
251  // as determined by $wgRCMaxAge.
252  // Note that we allow 1 link higher than the max for things like 56 days but a 60 day link.
253  sort( $wgRCLinkDays );
254  for ( $i = 0; $i < count( $wgRCLinkDays ); $i++ ) {
255  if ( $wgRCLinkDays[$i] >= $wgRCMaxAge / ( 3600 * 24 ) ) {
256  $wgRCLinkDays = array_slice( $wgRCLinkDays, 0, $i + 1, false );
257  break;
258  }
259  }
260 }
261 
262 if ( $wgSkipSkin ) {
263  $wgSkipSkins[] = $wgSkipSkin;
264 }
265 
266 if ( $wgLocalInterwiki ) {
267  array_unshift( $wgLocalInterwikis, $wgLocalInterwiki );
268 }
269 
270 // Set default shared prefix
271 if ( $wgSharedPrefix === false ) {
272  $wgSharedPrefix = $wgDBprefix;
273 }
274 
275 if ( !$wgCookiePrefix ) {
276  if ( $wgSharedDB && $wgSharedPrefix && in_array( 'user', $wgSharedTables ) ) {
277  $wgCookiePrefix = $wgSharedDB . '_' . $wgSharedPrefix;
278  } elseif ( $wgSharedDB && in_array( 'user', $wgSharedTables ) ) {
279  $wgCookiePrefix = $wgSharedDB;
280  } elseif ( $wgDBprefix ) {
281  $wgCookiePrefix = $wgDBname . '_' . $wgDBprefix;
282  } else {
284  }
285 }
286 $wgCookiePrefix = strtr( $wgCookiePrefix, '=,; +."\'\\[', '__________' );
287 
288 $wgUseEnotif = $wgEnotifUserTalk || $wgEnotifWatchlist;
289 
290 if ( $wgMetaNamespace === false ) {
291  $wgMetaNamespace = str_replace( ' ', '_', $wgSitename );
292 }
293 
294 // Default value is either the suhosin limit or -1 for unlimited
295 if ( $wgResourceLoaderMaxQueryLength === false ) {
296  $maxValueLength = ini_get( 'suhosin.get.max_value_length' );
297  $wgResourceLoaderMaxQueryLength = $maxValueLength > 0 ? $maxValueLength : -1;
298 }
299 
305  NS_MEDIA => 'Media',
306  NS_SPECIAL => 'Special',
307  NS_TALK => 'Talk',
308  NS_USER => 'User',
309  NS_USER_TALK => 'User_talk',
310  NS_PROJECT => 'Project',
311  NS_PROJECT_TALK => 'Project_talk',
312  NS_FILE => 'File',
313  NS_FILE_TALK => 'File_talk',
314  NS_MEDIAWIKI => 'MediaWiki',
315  NS_MEDIAWIKI_TALK => 'MediaWiki_talk',
316  NS_TEMPLATE => 'Template',
317  NS_TEMPLATE_TALK => 'Template_talk',
318  NS_HELP => 'Help',
319  NS_HELP_TALK => 'Help_talk',
320  NS_CATEGORY => 'Category',
321  NS_CATEGORY_TALK => 'Category_talk',
322 );
323 
325 if ( is_array( $wgExtraNamespaces ) ) {
327 }
328 
329 // These are now the same, always
330 // To determine the user language, use $wgLang->getCode()
331 $wgContLanguageCode = $wgLanguageCode;
332 
333 // Easy to forget to falsify $wgShowIPinHeader for static caches.
334 // If file cache or squid cache is on, just disable this (DWIMD).
335 // Do the same for $wgDebugToolbar.
336 if ( $wgUseFileCache || $wgUseSquid ) {
337  $wgShowIPinHeader = false;
338  $wgDebugToolbar = false;
339 }
340 
341 // Doesn't make sense to have if disabled.
342 if ( !$wgEnotifMinorEdits ) {
343  $wgHiddenPrefs[] = 'enotifminoredits';
344 }
345 
346 // We always output HTML5 since 1.22, overriding these is no longer supported
347 // we set them here for extensions that depend on its value.
348 $wgHtml5 = true;
349 $wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml';
350 $wgJsMimeType = 'text/javascript';
351 
352 if ( !$wgHtml5Version && $wgAllowRdfaAttributes ) {
353  // see http://www.w3.org/TR/rdfa-in-html/#document-conformance
354  if ( $wgMimeType == 'application/xhtml+xml' ) {
355  $wgHtml5Version = 'XHTML+RDFa 1.0';
356  } else {
357  $wgHtml5Version = 'HTML+RDFa 1.0';
358  }
359 }
360 
361 // Blacklisted file extensions shouldn't appear on the "allowed" list
362 $wgFileExtensions = array_values( array_diff ( $wgFileExtensions, $wgFileBlacklist ) );
363 
364 if ( $wgArticleCountMethod === null ) {
365  $wgArticleCountMethod = $wgUseCommaCount ? 'comma' : 'link';
366 }
367 
368 if ( $wgInvalidateCacheOnLocalSettingsChange ) {
369  $wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( "$IP/LocalSettings.php" ) ) );
370 }
371 
372 if ( $wgNewUserLog ) {
373  // Add a new log type
374  $wgLogTypes[] = 'newusers';
375  $wgLogNames['newusers'] = 'newuserlogpage';
376  $wgLogHeaders['newusers'] = 'newuserlogpagetext';
377  $wgLogActionsHandlers['newusers/newusers'] = 'NewUsersLogFormatter';
378  $wgLogActionsHandlers['newusers/create'] = 'NewUsersLogFormatter';
379  $wgLogActionsHandlers['newusers/create2'] = 'NewUsersLogFormatter';
380  $wgLogActionsHandlers['newusers/byemail'] = 'NewUsersLogFormatter';
381  $wgLogActionsHandlers['newusers/autocreate'] = 'NewUsersLogFormatter';
382 }
383 
384 if ( $wgCookieSecure === 'detect' ) {
385  $wgCookieSecure = ( WebRequest::detectProtocol() === 'https' );
386 }
387 
388 if ( $wgRC2UDPAddress ) {
389  $wgRCFeeds['default'] = array(
390  'formatter' => 'IRCColourfulRCFeedFormatter',
391  'uri' => "udp://$wgRC2UDPAddress:$wgRC2UDPPort/$wgRC2UDPPrefix",
392  'add_interwiki_prefix' => &$wgRC2UDPInterwikiPrefix,
393  'omit_bots' => &$wgRC2UDPOmitBots,
394  );
395 }
396 
397 wfProfileOut( $fname . '-defaults' );
398 
399 // Disable MWDebug for command line mode, this prevents MWDebug from eating up
400 // all the memory from logging SQL queries on maintenance scripts
402 if ( $wgDebugToolbar && !$wgCommandLineMode ) {
403  wfProfileIn( $fname . '-debugtoolbar' );
404  MWDebug::init();
405  wfProfileOut( $fname . '-debugtoolbar' );
406 }
407 
408 if ( !class_exists( 'AutoLoader' ) ) {
409  require_once "$IP/includes/AutoLoader.php";
410 }
411 
412 wfProfileIn( $fname . '-exception' );
414 wfProfileOut( $fname . '-exception' );
415 
416 wfProfileIn( $fname . '-includes' );
417 require_once "$IP/includes/normal/UtfNormalUtil.php";
418 require_once "$IP/includes/GlobalFunctions.php";
419 require_once "$IP/includes/normal/UtfNormalDefines.php";
420 wfProfileOut( $fname . '-includes' );
421 
422 wfProfileIn( $fname . '-defaults2' );
423 if ( $wgSecureLogin && substr( $wgServer, 0, 2 ) !== '//' ) {
424  $wgSecureLogin = false;
425  wfWarn( 'Secure login was enabled on a server that only supports HTTP or HTTPS. Disabling secure login.' );
426 }
427 
428 // Now that GlobalFunctions is loaded, set defaults that depend
429 // on it.
430 if ( $wgTmpDirectory === false ) {
431  wfProfileIn( $fname . '-tempDir' );
432  $wgTmpDirectory = wfTempDir();
433  wfProfileOut( $fname . '-tempDir' );
434 }
435 
436 if ( $wgCanonicalServer === false ) {
437  $wgCanonicalServer = wfExpandUrl( $wgServer, PROTO_HTTP );
438 }
439 
440 // $wgHTCPMulticastRouting got renamed to $wgHTCPRouting in MediaWiki 1.22
441 // ensure back compatibility.
442 if ( !$wgHTCPRouting && $wgHTCPMulticastRouting ) {
443  $wgHTCPRouting = $wgHTCPMulticastRouting;
444 }
445 
446 // Initialize $wgHTCPRouting from backwards-compatible settings that
447 // comes from pre 1.20 version.
448 if ( !$wgHTCPRouting && $wgHTCPMulticastAddress ) {
449  $wgHTCPRouting = array(
450  '' => array(
451  'host' => $wgHTCPMulticastAddress,
452  'port' => $wgHTCPPort,
453  )
454  );
455 }
456 
457 // Back compatibility for $wgRateLimitLog deprecated with 1.23
458 if ( $wgRateLimitLog && ! array_key_exists( 'ratelimit', $wgDebugLogGroups ) ) {
459  $wgDebugLogGroups['ratelimit'] = $wgRateLimitLog;
460 }
461 
462 if ( $wgProfileOnly ) {
463  $wgDebugLogGroups['profileoutput'] = $wgDebugLogFile;
464  $wgDebugLogFile = '';
465 }
466 
467 wfProfileOut( $fname . '-defaults2' );
468 wfProfileIn( $fname . '-misc1' );
469 
470 // Raise the memory limit if it's too low
471 wfMemoryLimit();
472 
478 if ( is_null( $wgLocaltimezone ) ) {
480  $wgLocaltimezone = date_default_timezone_get();
482 }
483 
484 date_default_timezone_set( $wgLocaltimezone );
485 if ( is_null( $wgLocalTZoffset ) ) {
486  $wgLocalTZoffset = date( 'Z' ) / 60;
487 }
488 
489 // Useful debug output
490 if ( $wgCommandLineMode ) {
491  $wgRequest = new FauxRequest( array() );
492 
493  wfDebug( "\n\nStart command line script $self\n" );
494 } else {
495  // Can't stub this one, it sets up $_GET and $_REQUEST in its constructor
496  $wgRequest = new WebRequest;
497 
498  $debug = "\n\nStart request {$wgRequest->getMethod()} {$wgRequest->getRequestURL()}\n";
499 
500  if ( $wgDebugPrintHttpHeaders ) {
501  $debug .= "HTTP HEADERS:\n";
502 
503  foreach ( $wgRequest->getAllHeaders() as $name => $value ) {
504  $debug .= "$name: $value\n";
505  }
506  }
507  wfDebug( $debug );
508 }
509 
510 wfProfileOut( $fname . '-misc1' );
511 wfProfileIn( $fname . '-memcached' );
512 
517 
518 wfDebugLog( 'caches', 'main: ' . get_class( $wgMemc ) .
519  ', message: ' . get_class( $messageMemc ) .
520  ', parser: ' . get_class( $parserMemc ) );
521 
522 wfProfileOut( $fname . '-memcached' );
523 
524 // Most of the config is out, some might want to run hooks here.
525 wfRunHooks( 'SetupAfterCache' );
526 
527 wfProfileIn( $fname . '-session' );
528 
529 // If session.auto_start is there, we can't touch session name
530 if ( !wfIniGetBool( 'session.auto_start' ) ) {
531  session_name( $wgSessionName ? $wgSessionName : $wgCookiePrefix . '_session' );
532 }
533 
534 if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) {
535  if ( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix . 'Token'] ) ) {
536  wfSetupSession();
537  $wgSessionStarted = true;
538  } else {
539  $wgSessionStarted = false;
540  }
541 }
542 
543 wfProfileOut( $fname . '-session' );
544 wfProfileIn( $fname . '-globals' );
545 
546 $wgContLang = Language::factory( $wgLanguageCode );
547 $wgContLang->initEncoding();
548 $wgContLang->initContLang();
549 
550 // Now that variant lists may be available...
551 $wgRequest->interpolateTitle();
552 $wgUser = RequestContext::getMain()->getUser(); // BackCompat
553 
558 
562 $wgOut = RequestContext::getMain()->getOutput(); // BackCompat
563 
567 $wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) );
568 
569 if ( !is_object( $wgAuth ) ) {
570  $wgAuth = new AuthPlugin;
571  wfRunHooks( 'AuthPluginSetup', array( &$wgAuth ) );
572 }
573 
574 # Placeholders in case of DB error
575 $wgTitle = null;
576 
578 
579 wfProfileOut( $fname . '-globals' );
580 wfProfileIn( $fname . '-extensions' );
581 
582 // Extension setup functions for extensions other than skins
583 // Entries should be added to this variable during the inclusion
584 // of the extension file. This allows the extension to perform
585 // any necessary initialisation in the fully initialised environment
586 foreach ( $wgExtensionFunctions as $func ) {
587  // Allow closures in PHP 5.3+
588  if ( is_object( $func ) && $func instanceof Closure ) {
589  $profName = $fname . '-extensions-closure';
590  } elseif ( is_array( $func ) ) {
591  if ( is_object( $func[0] ) ) {
592  $profName = $fname . '-extensions-' . get_class( $func[0] ) . '::' . $func[1];
593  } else {
594  $profName = $fname . '-extensions-' . implode( '::', $func );
595  }
596  } else {
597  $profName = $fname . '-extensions-' . strval( $func );
598  }
599 
600  wfProfileIn( $profName );
601  call_user_func( $func );
602  wfProfileOut( $profName );
603 }
604 
605 wfDebug( "Fully initialised\n" );
607 
608 wfProfileOut( $fname . '-extensions' );
$wgUser
$wgUser
Definition: Setup.php:552
FauxRequest
WebRequest clone which takes values from a provided array.
Definition: WebRequest.php:1275
$wgActionPaths
$wgActionPaths
Definition: img_auth.php:49
NS_HELP
const NS_HELP
Definition: Defines.php:91
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
wfSetupSession
wfSetupSession( $sessionId=false)
Initialise php session.
Definition: GlobalFunctions.php:3523
StubObject
Class to implement stub globals, which are globals that delay loading the their associated module cod...
Definition: StubObject.php:44
NS_TEMPLATE_TALK
const NS_TEMPLATE_TALK
Definition: Defines.php:90
$wgLang
$wgLang
Definition: Setup.php:557
wfDebugLog
wfDebugLog( $logGroup, $text, $dest='all')
Send a line to a supplementary debug log file, if configured, or main debug log if not.
Definition: GlobalFunctions.php:1040
wfProfileIn
wfProfileIn( $functionname)
Begin profiling of a function.
Definition: Profiler.php:33
$wgCookiePrefix
if( $wgRCFilterByAge) if( $wgSkipSkin) if( $wgLocalInterwiki) if( $wgSharedPrefix===false) if(! $wgCookiePrefix) $wgCookiePrefix
Definition: Setup.php:286
wfSuppressWarnings
wfSuppressWarnings( $end=false)
Reference-counted warning suppression.
Definition: GlobalFunctions.php:2387
$fname
if(!defined( 'MEDIAWIKI')) $fname
This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined.
Definition: Setup.php:35
NS_FILE
const NS_FILE
Definition: Defines.php:85
NS_TEMPLATE
const NS_TEMPLATE
Definition: Defines.php:89
MWExceptionHandler\installHandler
static installHandler()
Install an exception handler for MediaWiki exception types.
Definition: MWExceptionHandler.php:29
WebRequest\detectProtocol
static detectProtocol()
Detect the protocol from $_SERVER.
Definition: WebRequest.php:202
$wgCanonicalNamespaceNames
if( $wgMetaNamespace===false) if( $wgResourceLoaderMaxQueryLength===false) $wgCanonicalNamespaceNames
Definitions of the NS_ constants are in Defines.php.
Definition: Setup.php:304
$wgHtml5
if( $wgUseFileCache|| $wgUseSquid) if(! $wgEnotifMinorEdits) $wgHtml5
Definition: Setup.php:348
$wgDeferredUpdateList
$wgDeferredUpdateList
Definition: Setup.php:577
$wgMemc
$wgMemc
Definition: Setup.php:513
NS_SPECIAL
const NS_SPECIAL
Definition: Defines.php:68
wfGetMainCache
wfGetMainCache()
Get the main cache object.
Definition: GlobalFunctions.php:3957
NS_PROJECT
const NS_PROJECT
Definition: Defines.php:83
$wgDBname
controlled by $wgMainCacheType controlled by $wgParserCacheType controlled by $wgMessageCacheType If you set CACHE_NONE to one of the three control default value for MediaWiki still create a but requests to it are no ops and we always fall through to the database If the cache daemon can t be it should also disable itself fairly smoothly By $wgMemc is used but when it is $parserMemc or $messageMemc this is mentioned $wgDBname
Definition: memcached.txt:96
wfRestoreWarnings
wfRestoreWarnings()
Restore error level to previous value.
Definition: GlobalFunctions.php:2417
$wgContLanguageCode
if(is_array( $wgExtraNamespaces)) $wgContLanguageCode
Definition: Setup.php:331
$wgFullyInitialised
$wgFullyInitialised
Definition: Setup.php:606
$wgCommandLineMode
global $wgCommandLineMode
Definition: Setup.php:401
$parserMemc
$parserMemc
Definition: Setup.php:515
NS_MEDIAWIKI_TALK
const NS_MEDIAWIKI_TALK
Definition: Defines.php:88
wfProfileOut
wfProfileOut( $functionname='missing')
Stop profiling of a function.
Definition: Profiler.php:46
$wgOut
$wgOut
Definition: Setup.php:562
$wgLangConvMemc
$wgLangConvMemc
Definition: Setup.php:516
wfRunHooks
wfRunHooks( $event, array $args=array(), $deprecatedVersion=null)
Call hook functions defined in $wgHooks.
Definition: GlobalFunctions.php:4001
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
$wgFileExtensions
if(! $wgHtml5Version && $wgAllowRdfaAttributes) $wgFileExtensions
Definition: Setup.php:362
NS_CATEGORY
const NS_CATEGORY
Definition: Defines.php:93
wfMemoryLimit
wfMemoryLimit()
Set PHP's memory limit to the larger of php.ini or $wgMemoryLimit;.
Definition: GlobalFunctions.php:3861
$wgLockManagers
$wgLockManagers[]
Initialise $wgLockManagers to include basic FS version.
Definition: Setup.php:148
wfDebug
wfDebug( $text, $dest='all')
Sends a line to the debug log if enabled or, optionally, to a comment in output.
Definition: GlobalFunctions.php:933
NS_USER_TALK
const NS_USER_TALK
Definition: Defines.php:82
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:336
$messageMemc
$messageMemc
Definition: Setup.php:514
$value
$value
Definition: styleTest.css.php:45
NS_MEDIA
const NS_MEDIA
Definition: Defines.php:67
$wgNamespaceAliases
$wgNamespaceAliases['Image']
The canonical names of namespaces 6 and 7 are, as of v1.14, "File" and "File_talk".
Definition: Setup.php:142
StubUserLang
Stub object for the user language.
Definition: StubObject.php:190
$wgTitle
if(!is_object( $wgAuth)) $wgTitle
Definition: Setup.php:575
PROTO_HTTP
const PROTO_HTTP
Definition: Defines.php:267
$wgJsMimeType
$wgJsMimeType
Definition: Setup.php:350
NS_PROJECT_TALK
const NS_PROJECT_TALK
Definition: Defines.php:84
MWDebug\init
static init()
Enabled the debugger and load resource module.
Definition: Debug.php:76
wfGetParserCacheStorage
wfGetParserCacheStorage()
Get the cache object used by the parser cache.
Definition: GlobalFunctions.php:3977
RequestContext\getMain
static getMain()
Static methods.
Definition: RequestContext.php:420
wfIniGetBool
wfIniGetBool( $setting)
Safety wrapper around ini_get() for boolean settings.
Definition: GlobalFunctions.php:2685
WebRequest
The WebRequest class encapsulates getting at data passed in the URL or via a POSTed form,...
Definition: WebRequest.php:38
$wgUseEnotif
$wgUseEnotif
Definition: Setup.php:288
$wgArticlePath
$wgArticlePath
Definition: img_auth.php:48
DBO_DEFAULT
const DBO_DEFAULT
Definition: Defines.php:43
wfGetMessageCacheStorage
wfGetMessageCacheStorage()
Get the cache object used by the message cache.
Definition: GlobalFunctions.php:3967
$wgXhtmlDefaultNamespace
$wgXhtmlDefaultNamespace
Definition: Setup.php:349
$debug
$debug
Definition: Setup.php:498
wfTempDir
wfTempDir()
Tries to get the system directory for temporary files.
Definition: GlobalFunctions.php:2564
wfGetLangConverterCacheStorage
wfGetLangConverterCacheStorage()
Get the cache object used by the language converter.
Definition: GlobalFunctions.php:3987
$wgParser
$wgParser
Definition: Setup.php:567
NS_HELP_TALK
const NS_HELP_TALK
Definition: Defines.php:92
as
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Definition: distributors.txt:9
NS_USER
const NS_USER
Definition: Defines.php:81
$wgNamespaceProtection
if(!isset( $wgVersion)) if( $wgScript===false) if( $wgLoadScript===false) if( $wgArticlePath===false) if(!empty( $wgActionPaths) &&!isset( $wgActionPaths['view'])) if( $wgStylePath===false) if( $wgLocalStylePath===false) if( $wgStyleDirectory===false) if( $wgExtensionAssetsPath===false) if( $wgLogo===false) if( $wgUploadPath===false) if( $wgUploadDirectory===false) if( $wgReadOnlyFile===false) if( $wgFileCacheDirectory===false) if( $wgDeletedDirectory===false) if(isset( $wgFileStore['deleted']['directory'])) if(isset( $wgFooterIcons['copyright']) &&isset( $wgFooterIcons['copyright']['copyright']) && $wgFooterIcons['copyright']['copyright']===array()) if(isset( $wgFooterIcons['poweredby']) &&isset( $wgFooterIcons['poweredby']['mediawiki']) && $wgFooterIcons['poweredby']['mediawiki']['src']===null) $wgNamespaceProtection[NS_MEDIAWIKI]
Unconditional protection for NS_MEDIAWIKI since otherwise it's too easy for a sysadmin to set $wgName...
Definition: Setup.php:135
NS_TALK
const NS_TALK
Definition: Defines.php:80
Language\factory
static factory( $code)
Get a cached or new language object for a given language code.
Definition: Language.php:184
wfWarn
wfWarn( $msg, $callerOffset=1, $level=E_USER_NOTICE)
Send a warning either to the debug log or in a PHP error depending on $wgDevelopmentWarnings.
Definition: GlobalFunctions.php:1141
NS_MEDIAWIKI
const NS_MEDIAWIKI
Definition: Defines.php:87
NS_FILE_TALK
const NS_FILE_TALK
Definition: Defines.php:86
NS_CATEGORY_TALK
const NS_CATEGORY_TALK
Definition: Defines.php:94
$wgContLang
$wgContLang
Definition: Setup.php:546
DBO_DEBUG
const DBO_DEBUG
Definition: Defines.php:39
wfExpandUrl
wfExpandUrl( $url, $defaultProto=PROTO_CURRENT)
Expand a potentially local URL to a fully-qualified URL.
Definition: GlobalFunctions.php:497
AuthPlugin
Authentication plugin interface.
Definition: AuthPlugin.php:36