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.

http://api.drupal.org/api/function/current_path/7

Comments

sun’s picture

Status: Needs work » Postponed (maintainer needs more info)

Why?

sun’s picture

This means a lot of function calls for .... nothing.

damien tournoud’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Yeah, don't.

mcrittenden’s picture

Status: Closed (won't fix) » Active

Just 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?

sun’s picture

You 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.

traviscarden’s picture

Status: Active » Closed (duplicate)

This issue has been rendered moot by #1262014: Move request path handling into context.