Jump to content

User:Giuseppe Lavagetto/Mediawiki-config include chain

From Wikitech
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

In production, this is the chain of includes for MediaWiki:

# Inside the /w/index.php file in mediawiki-config
require 'multiversion/MWMultiVersion.php';

  # Inside MWMultiVersion.php
  require 'multiversion/defines.php';
  require 'multiversion/MWRealm.php';

require MWMultiVersion::getMediaWiki( 'index.php' ); # this requires index.php from core in the correct version, which in turn will include LocalSettings.php eventually

  # Inside php.../LocalSettings.php
  require "/srv/mediawiki/wmf-config/CommonSettings.php";

    # Inside CommonSettings.php
    require 'wmf-config/wgConf.php';
    # In the scope of a function in CommonSettings.php
    require 'wmf-config/InitialiseSettings.php'

So basically anything you declare in CommonSettings.php is in file scope as far as I understand, which means it's referenceable everywhere, potentially.