Now that #431976: Add wrapper function for current url (i.e., $_GET['q']) gave D7 us a wrapper function for $_GET['q'], we need to start using it instead of $_GET['q'] wherever possible in core.
Now that #431976: Add wrapper function for current url (i.e., $_GET['q']) gave D7 us a wrapper function for $_GET['q'], we need to start using it instead of $_GET['q'] wherever possible in core.
Comments
Comment #1
sunWhy?
Comment #2
sunThis means a lot of function calls for .... nothing.
Comment #3
damien tournoud commentedYeah, don't.
Comment #4
mcrittenden commentedJust seems confusing. We now have $_GET['q'] all throughout core but we also have current_path() in a few places, just like we have base_path() in a few places and $GLOBALS['base_path'] in a few places. We need to go one way or the other, no?
Comment #5
sunYou can't convert all anyway. For the reasons outlined in #431976: Add wrapper function for current url (i.e., $_GET['q']).
I've already told over there that current_path() is an insane function to add. You can't always use it, so we introduced yet another WTF to Drupal. If that is considered better DX, then we have a fundamentally different understanding of DX.
Comment #6
traviscarden commentedThis issue has been rendered moot by #1262014: Move request path handling into context.