Pending

User tests: Successful: Unsuccessful:

avatar wilsonge
wilsonge
5 Nov 2014

Executive Summary

Move from using JFactory::getDatabase() to the internal JModelLegacy method to allow the JDatabase object to be injected if desired.

Detailed Information

The model allows injection of the database object via the config parameter in it's constructor. However it means you must use the getDbo() function instead of using JFactory. Note this is completely b/c with all previous implementations and indeed getDbo() is used in other parts of the component (e.g. https://github.com/wilsonge/weblinks/blob/patch-1/src/com_weblinks/admin/models/weblinks.php#L124)

Testing

To test ensure that saving any new or existing weblink continues to work perfectly

Further Notes

This is part of a PR to the CMS at joomla/joomla-cms#4992 doing the same thing across all component models

avatar wilsonge wilsonge - open - 5 Nov 2014
avatar wilsonge wilsonge - reference | - 8 Feb 15
avatar wilsonge wilsonge - merge - 8 Feb 2015
avatar wilsonge wilsonge - close - 8 Feb 2015
avatar wilsonge wilsonge - head_ref_deleted - 8 Feb 2015

Add a Comment

Login with GitHub to post a comment