• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Implemented Pass $xml to add-on installer callback in XenForo_Model_AddOn

Jon W

Well-known member
#1
In the function installAddOnXml in the Add-on model, it would be useful if the variable $xml was passed to the add-on installer PHP callback (possibly passed by reference, but I don't think that is necessary) so that it could be manipulated by the add-on installer PHP callback.

In other words, the following code:
PHP:
        if ($addOnData['install_callback_class'] && $addOnData['install_callback_method'])
        {
            call_user_func(
                array($addOnData['install_callback_class'], $addOnData['install_callback_method']),
                $existingAddOn,
                $addOnData
            );
        }
should be replaced with:
PHP:
        if ($addOnData['install_callback_class'] && $addOnData['install_callback_method'])
        {
            call_user_func(
                array($addOnData['install_callback_class'], $addOnData['install_callback_method']),
                $existingAddOn,
                $addOnData,
                $xml
            );
        }
This would be particularly useful in light of the recent changes to code event listeners.