Cannot reproduce Unable to change $extraParams in route prefix

Jon W

Well-known member
In the buildLink function in route prefixes, the $extraParams variable is passed by reference, but it doesn't actually appear to be able to be changed.

It would be nice to be able to add/remove parameters from $extraParams in the route prefix. I assume this was the intention? If not, please move to suggestions.
 
Unless this has changed I use $extraParams in the route to send extra data to my controller: $extraParams['mydata'] = xxxxx
return XenForo_Link::buildBasicLinkWithStringParam($outputPrefix, $action, $extension, $data, 'some_id', $extraParams);

Then in the controllerPublic: $myData = $this->_input->filterSingle('mydata', XenForo_Input::STRING);
 
I can't reproduce this. I added this to the thread prefix builder:
Code:
$extraParams['extra'] = 1;
And all thread links had ?extra=1 appended.
 
Could be because I'm on a different computer, but I can't replicate this now either. :confused:

Sorry for being a pain.
 

Similar threads

Back
Top Bottom