[3.2] [ticket/12612] Front-facing files should not contain functions

https://tracker.phpbb.com/browse/PHPBB3-12612