aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php41
1 files changed, 0 insertions, 41 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 49d4e03921..ab4df9be54 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -5708,44 +5708,3 @@ function phpbb_convert_30_dbms_to_31($dbms)
throw new \RuntimeException("You have specified an invalid dbms driver: $dbms");
}
-
-/**
-* Create a Symfony Request object from phpbb_request object
-*
-* @param phpbb_request $request Request object
-* @return Request A Symfony Request object
-*/
-function phpbb_create_symfony_request(phpbb_request $request)
-{
- // If we have already gotten it, don't go back through all the trouble of
- // creating it again; instead, just return it. This allows multiple calls
- // of this method so we don't have to globalize $symfony_request in other
- // functions.
- static $symfony_request;
- if (null !== $symfony_request)
- {
- return $symfony_request;
- }
-
- // This function is meant to sanitize the global input arrays
- $sanitizer = function(&$value, $key) {
- $type_cast_helper = new phpbb_request_type_cast_helper();
- $type_cast_helper->set_var($value, $value, gettype($value), true);
- };
-
- // We need to re-enable the super globals so we can access them here
- $request->enable_super_globals();
- $get_parameters = $_GET;
- $post_parameters = $_POST;
- $server_parameters = $_SERVER;
- $files_parameters = $_FILES;
- $cookie_parameters = $_COOKIE;
- // And now disable them again for security
- $request->disable_super_globals();
-
- array_walk_recursive($get_parameters, $sanitizer);
- array_walk_recursive($post_parameters, $sanitizer);
-
- $symfony_request = new Symfony\Component\HttpFoundation\Request($get_parameters, $post_parameters, array(), $cookie_parameters, $files_parameters, $server_parameters);
- return $symfony_request;
-}