Ticket/12612 Front-facing files should not contain functions

Replaces: #2614

https://tracker.phpbb.com/browse/PHPBB3-12612