[ticket/11585] Make build_permission_array static function

http://tracker.phpbb.com/browse/PHPBB3-11585
PHPBB3-11585