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

Implemented init_dependencies $data by reference, or XenForo_Link getter

Discussion in 'Closed Suggestions' started by Jake Bunce, Mar 6, 2012.

  1. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    These two addons conflict with each other:


    XenPorta has an init_dependencies listener that swaps the 'index' route at run time. The Route Changer addon does exactly the same thing... it defines routes at run time. These two addons are unaware of the changes being made by the other, and one overwrites the changes of the other when calling XenForo_Link::setHandlerInfoForGroup.

    I see two possible fixes:

    1) Change $data to be passed by reference for init_dependencies.

    2) Add a getHandlerInfoForGroup() function to XenForo_Link.

    Both solutions would allow me to access the current routes as they have been set by XenPorta and possibly other addons. That way I can make additional route changes without overwriting changes from other addons.

    In the meantime I am going to add a feature to my addon to allow people to duplicate XenPorta's route changes in my addon. That way it doesn't matter that I am overwriting XenPorta's custom routes.
    Andy.N and yavuz like this.
  2. Mike

    Mike XenForo Developer Staff Member

    I added getHandlerInfoForGroup() for 1.2.
    Jake Bunce likes this.

Share This Page