[ticket/13147] Removing globals and using injection

Using globals is NG. Using a parameter instead.

PHPBB3-13147
[ticket/13147] Renaming content_replaced->get_global_visibility_sql_overwrite

Renamed content_replaced to get_global_visibility_sql_overwrite in order to
follow the convention in other events' variables that have the same basic
function

PHPBB3-13147