Update template.php

Tracker: #32173
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=32173&start=0