Add hook to allow lazy loading of import sources
authorThis, that and the other <at.light@live.com.au>
Wed, 23 Sep 2015 07:54:31 +0000 (17:54 +1000)
committerThis, that and the other <at.light@live.com.au>
Wed, 23 Sep 2015 07:54:31 +0000 (17:54 +1000)
commitd3b85592ead7fc1348c20c565fd21375da5417de
tree81332e2fe09978fe71541c572e9a315c57abfcbc
parentf17ae78218685ee55b0a599b1b65932f2a5ca99a
Add hook to allow lazy loading of import sources

Currently import sources have to be set into $wgImportSources as part of
wiki startup. This is not practical for the WMF cluster, where we need some
reasonably complex logic to set up the import source structure.

This change allows the import source list to be populated from a new
"ImportSources" hook. This hook is only called when the list of import
sources is actually needed (namely, when a user with relevant permissions
loads Special:Import).

Bug: T17583
Change-Id: Ice9a19cb6dfe53ae72aa71353d0553ee9338f233
docs/hooks.txt
includes/DefaultSettings.php
includes/api/ApiImport.php
includes/specials/SpecialImport.php