Although not essential, it would be good if arg() can return all request aruments. It is a minor enhancement, but IMO encourages consistency.

CommentFileSizeAuthor
bootstrap_2.patch951 bytesdikini

Comments

dikini’s picture

Version: 4.6.0 »

Sorry, moved the version to cvs, it is applicable, but not really relevan for 4.6

Steven’s picture

As far as I know, this would be equivalent to just using $_GET['q'], which we use elsewhere. It is certainly nicer in code, but you should also update the places where this is used then.

dikini’s picture

That's true. This is mainly a utility/readability concern.

I can do that, but it is a bit of an effort, and since it won't break any existing functionality, I haven't even though of doing it. I thoght small patches are better :) There are 64 uses of $_GET currently in core, and each of them should be considered with care.

There is a long term possibility, which might be worth exploring - capturing info not only from GET, but POST, PUT, ... requests.

dries’s picture

There is no problem with using $_GET['q']. I'm not tempted to commit this patch.

killes@www.drop.org’s picture

Status: Needs review » Closed (won't fix)

Dries doesn't like it and there was no reply by the author.