Opened 7 years ago

Closed 7 years ago

#2777 closed defect (bug) (fixed)

query_string_array filter

Reported by: markjaquith Owned by: anonymous
Priority: normal Milestone: 2.1
Component: Administration Version: 2.1
Severity: normal Keywords: hook filter
Cc:

Description

Right now, you can filter the query string, but it is passed, well, as a query string. So to do anything useful, you have to use parse_str(), and then get it back to its original form when you are done. How about a hook that extracts it all into an array first?

Check out the attached patch.

Attachments (1)

query_string_array.diff (628 bytes) - added by markjaquith 7 years ago.
Patch for /trunk/

Download all attachments as: .zip

Change History (3)

Patch for /trunk/

+1 - Instead of parsing and then recreating again, why not have build_query_string create an array first (in the foreachs), filter that array, then create the query string from the filtered array? That way you can ensure the filtered query string is rawurlencoded (in case the plugin writer forgets or is unaware).

comment:2   ryan7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [4129]) Deprecate query_string. Add 'request' filter to filter the array of query vars. Pass around arrays instead of query strings. fixes #2777

Note: See TracTickets for help on using tickets.