? Success

User tests: Successful: Unsuccessful:

avatar wilsonge
wilsonge
11 Jun 2014

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33850&start=0

Allow the $config param to continue to work from the JFactory::getApplication() function or the legacy JApplication::getInstance() function.

JApplicationCms has a $config param in the constructor but not in the getInstance() function. This PR adds that support in and stops the config from being immediately overwritten when the app is initalised. Note that the config (from JFactory::getConfig() still takes priority over anything initialised in the app's constructor however.

For testing instructions see the tracker item

avatar wilsonge wilsonge - open - 11 Jun 2014
avatar wilsonge wilsonge - change - 11 Jun 2014
The description was changed
Description <p>Allow the $config param to continue to work from the JFactory::getApplication() function or the legacy JApplication::getInstance() function</p> <p>Allow the $config param to continue to work from the JFactory::getApplication() function or the legacy JApplication::getInstance() function</p> <p><a href="https://github.com/mbabker" class="user-mention">@mbabker</a> you were the master mind behind the conversion from the old JApplication - I dunno if there was any reason this wasn't done before?</p>
Labels Added: ? ?
avatar mbabker
mbabker - comment - 11 Jun 2014

Don't create a new JRegistry instance here. The application constructors handle creating it if it's null, just add the param.

As for why, I honestly don't remember.

avatar wilsonge
wilsonge - comment - 11 Jun 2014

I only create a new JRegistry instance if we get passed in an array (as was the standard for the legacy JApplication and JFactory()). As JRegistry is typehinted we can't just pass the array in

avatar dbhurley
dbhurley - comment - 13 Jun 2014

I understand the reason for creating a new JRegistry. It's not ideal but makes sense. One more tester?

avatar Hackwar
Hackwar - comment - 13 Jun 2014

Tested and works great. :smile: Can be merged.

avatar phproberto phproberto - change - 23 Jun 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-06-23 15:56:56
avatar phproberto phproberto - close - 23 Jun 2014

Add a Comment

Login with GitHub to post a comment