[ticket/12703] Only query database for subscription types once

Ticket: https://tracker.phpbb.com/browse/PHPBB3-12703