[ticket/12831] simplified code, upd event block

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

PHPBB3-12831