1. 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

Discussion in 'Closed Suggestions' started by Jon W, Jun 23, 2013.

  1. Jon W

    Jon W Well-Known Member

    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.
     
  2. Mike

    Mike XenForo Developer Staff Member

    (y) Implemented for 1.2 beta 2.
     
  3. Jon W

    Jon W Well-Known Member

Share This Page