diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2012-11-29 14:41:48 -0500 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2012-11-29 14:42:06 -0500 |
commit | 3e907265d5782c535d43e503c32390cfde8dc4a8 (patch) | |
tree | 554524b1888e3ef6642f727ab37fbc87adbba915 /phpBB | |
parent | 2a39df1a53ae4d9798bcba9ceee610190702cc4b (diff) | |
download | forums-3e907265d5782c535d43e503c32390cfde8dc4a8.tar forums-3e907265d5782c535d43e503c32390cfde8dc4a8.tar.gz forums-3e907265d5782c535d43e503c32390cfde8dc4a8.tar.bz2 forums-3e907265d5782c535d43e503c32390cfde8dc4a8.tar.xz forums-3e907265d5782c535d43e503c32390cfde8dc4a8.zip |
[ticket/11095] Docs and tests for phpbb_build_hidden_fields_for_query_params.
PHPBB3-11095
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/functions.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index ee5a1afd30..9c92adb0ec 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4940,6 +4940,20 @@ function phpbb_quoteattr($data, $entities = null) return $data; } +/** +* Converts query string (GET) parameters in request into hidden fields. +* +* Useful for forwarding GET parameters when submitting forms with GET method. +* +* It is possible to omit some of the GET parameters, which is useful if +* they are specified in the form being submitted. +* +* sid is always omitted. +* +* @param phpbb_request $request Request object +* @param array $exclude A list of variable names that should not be forwarded +* @return string HTML with hidden fields +*/ function phpbb_build_hidden_fields_for_query_params($request, $exclude = null) { $names = $request->variable_names(phpbb_request_interface::GET); |