[ticket/13230] Add missing globals and missing request object for path helper

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