? Success

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
8 Feb 2015

Point blank, JLanguage::setLanguage() is a terrible API endpoint and can break JLanguage when used. What the API endpoint suggests to do is essentially overload the current JLanguage instance with a new language, however it does not deal with re-loading pre-loaded language files or JLanguage's internal cache.

Uses of this method should be discouraged and instead a new JLanguage object be instantiated where this behavior was previously used.

avatar mbabker mbabker - open - 8 Feb 2015
avatar joomla-cms-bot joomla-cms-bot - change - 8 Feb 2015
Labels Added: ?
avatar wilsonge
wilsonge - comment - 8 Feb 2015

:+1:

avatar wilsonge wilsonge - change - 8 Feb 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-02-08 15:33:58
avatar wilsonge wilsonge - close - 8 Feb 2015
avatar wilsonge wilsonge - reference | - 8 Feb 15
avatar wilsonge wilsonge - merge - 8 Feb 2015
avatar wilsonge wilsonge - close - 8 Feb 2015
avatar richard67
richard67 - comment - 8 Feb 2015

Hmm, but the constructor of JLanguage still calls the depreceated function. Shouldn't this be changed, too?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6016.
avatar mbabker mbabker - head_ref_deleted - 8 Feb 2015
avatar mbabker
mbabker - comment - 8 Feb 2015

Just because it's deprecated doesn't mean it cannot be used, just that code should be updated to not use it before being removed. See #6018

avatar richard67
richard67 - comment - 8 Feb 2015

@mbabker Yes, with #6018 I am happy now.

Add a Comment

Login with GitHub to post a comment