[ticket/13147] Change get_global_visibility_sql()'s results

https://tracker.phpbb.com/browse/PHPBB3-13147
No globals in classes