[ticket/10423] Remove unnecessary include in test

PHPBB3-10423
[ticket/10423] Replace foreach with function in viewtopic.php

PHPBB3-10423