[ticket/11031] Correctly set topic and post visibility

PHPBB3-11031