joomla/joomla-cms — pull request #2227 by nikosdion (2013-10-12 06:53:17+00:00)
Title: FOFModel::getTmpInstance() clears input before getItemList() is run [Tracker 32258]

This PR fixes the [tracker item 32258](http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_id=8103&tracker_item_id=32258) "FOFModel::getTmpInstance() clears input before getItemList() is run".

The problem was in the PostinstallModelMessages. It should use getState to read the eid and published state variables, not try to read them directly from the input object. Reading directly from the input is discouraged. The models act on their state, not the global application input. This is a fundamental tenant of the MVC architecture. My bad! I wrote some very bad code in that model.

This PR fixes the PostinstallModelMessages model and also modifies the call to it from CpanelViewCpanel to correctly set the state variable, exactly as proper MVC prescribes.