Implemented init_dependencies $data by reference, or XenForo_Link getter

Jake Bunce

Well-known member
These two addons conflict with each other:

http://xenforo.com/community/resources/8wayrun-com-xenporta-portal.90/
http://xenforo.com/community/resources/route-changer.447/

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.
 
Upvote 2
This suggestion has been implemented. Votes are no longer accepted.
Top Bottom