Manual:Setup.php

From MediaWiki.org
Jump to: navigation, search

Other languages:
català • ‎Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎日本語 • ‎Bahasa Melayu • ‎Nederlands • ‎polski • ‎português • ‎português do Brasil • ‎русский • ‎中文

Details[edit]

Setup.php file is included from WebStart.phpManual:WebStart.php, provided the MW_NO_SETUP constant is not defined. It must be included after LocalSettings.phpManual:LocalSettings.php.

Actions taken[edit]

It does the following:

  1. First it changes some configuration settings such as paths variables that aren't customized in LocalSettings.php so that they don't need to be modified if $wgScriptPathManual:$wgScriptPath is changed or it updates new configuration settings from the backward compatible ones.
  2. Next it includes some commonly used files.
  3. It starts the PHP session if the session cookie or the user token cookie are present.
  4. It creates stub objects for global object variables, those globals will be unstubbed at the first call of one of their method.
  5. It runs all functions in $wgExtensionFunctionsManual:$wgExtensionFunctions.
  6. And calls some deprecated hooks for backward compatibility: LogPageValidTypesManual:Hooks/LogPageValidTypes, LogPageLogNameManual:Hooks/LogPageLogName, LogPageLogHeaderManual:Hooks/LogPageLogHeader and LogPageActionTextManual:Hooks/LogPageActionText.

See also[edit]