Changed the calling protocol for function wfRunHooks() in Hooks.php.
authorEvan Prodromou <evanprodromou@users.mediawiki.org>
Sun, 13 Mar 2005 15:29:43 +0000 (15:29 +0000)
committerEvan Prodromou <evanprodromou@users.mediawiki.org>
Sun, 13 Mar 2005 15:29:43 +0000 (15:29 +0000)
commitd63d4248a6c98ee3e9c8772ac9b12e0958a262c8
treed37d4fc186ed16b8afc3851507173eb23b4bb4dd
parent06e6cd5d995ea7d52d1c17e663ff8e13218192dd
Changed the calling protocol for function wfRunHooks() in Hooks.php.

Previously, this function used variable arguments to allow
different hooks to pass different parameters. However, var args
silently convert reference-calling to value-calling. So a call
that used to work like this:

    # old
    wfRunHooks('SomeEvent', $param1, &$param2, $param3);

...now works like this:

    # new
    wfRunHooks('SomeEvent', array($param1, &$param2, $param3));

Hook functions can now change pass-by-reference parameters correctly
(e.g. $param2 in the above example).

All calls to wfRunHooks() were changed and tested, and the change
was documented in docs/hooks.doc. This change was originally checked
in on REL1_4 branch as a bugfix, but per vibber reverted and checked
in to HEAD instead.
docs/hooks.doc
includes/Article.php
includes/EditPage.php
includes/Hooks.php
includes/SpecialBlockip.php
includes/SpecialEmailuser.php
includes/SpecialUserlogin.php
includes/SpecialUserlogout.php
includes/Title.php