Add ApiBeforeMain hook
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 12 Dec 2013 15:01:33 +0000 (10:01 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Thu, 12 Dec 2013 15:01:33 +0000 (10:01 -0500)
commit76c61632f79b6b3aa834ccaba73c845a75c75b40
tree749cfb2df4d56159e4c96ba473b2f459b6fe6036
parent8ce671e7914602a23b6767472ebbc7f72fb7f42e
Add ApiBeforeMain hook

$wgExtensionFunctions is called before the RequestContext is really
available (i.e. getTitle() is null, accessing the User object may fail
because other extensions' UserLoadFromSession hooks don't expect to be
called that early, etc). The index.php code path has BeforeInitialize to
take action after RequestContext is available but before much else
happens, but the API doesn't (yet) have anything similar.

Bug: 58380
Change-Id: I0a167faaa4166da381194c53373d82e038848924
RELEASE-NOTES-1.23
api.php
docs/hooks.txt