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

PHPBB3-13230
Merge pull request #3079 from nickvergessen/ticket/13230

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