Details
Description
Steps to reproduce:
1. Open page "civicrm/mailing/component"
2. Create a new footer. Flag the new footer as default
3. Open page "civicrm/mailing/send"
4. Proceed to the "Upload" step
5. The footer drop-down should have the new footer pre-selected, but it isn't.
Notably, default components are applied correctly on the "Settings" page, but they aren't applied correctly on the "Upload" page. The reason is that the controller for the "Upload" page makes no attempt to determine the default header or default footer. (Through dumb luck, the header and footer are sometimes used correctly on a fresh installation. However, the above steps break it.)
The attached patch fixes the "Upload" controller. In addition, it revises the "Settings" controller to use similar code (to improve maintainability).
I've only tried this out on CiviCRM 2.1.6. However, the relevant code in the 2.2 branch looks the same.