Manually made changes for Tracker item 30305 against latest master

Patch on tracker was outdated so have updated

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=30305