I revert the changes because of https://github.com/Nicofuma/phpbb/blob/ticket/12174/phpBB/phpbb/content_visibility.php#L429
I don't see how to use db.sql_build_array() without having an extra request to get the current value of the fields.