aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/request/request.php
diff options
context:
space:
mode:
authorNathaniel Guse <nathaniel.guse@gmail.com>2012-11-11 04:42:06 -0600
committerNathaniel Guse <nathaniel.guse@gmail.com>2012-11-11 04:42:06 -0600
commit84ba10ec8c023ab307eb7d0b829ab337aaaae78e (patch)
tree468abf9fbb513cba53803ca29c6b65fd4ea497ec /phpBB/includes/request/request.php
parent106daa09ebb5b12bf9892c41f8c1de627cf6b0e9 (diff)
parente86ecc0f3bd6383d31a670896720a970b8faaaa9 (diff)
downloadforums-84ba10ec8c023ab307eb7d0b829ab337aaaae78e.tar
forums-84ba10ec8c023ab307eb7d0b829ab337aaaae78e.tar.gz
forums-84ba10ec8c023ab307eb7d0b829ab337aaaae78e.tar.bz2
forums-84ba10ec8c023ab307eb7d0b829ab337aaaae78e.tar.xz
forums-84ba10ec8c023ab307eb7d0b829ab337aaaae78e.zip
Merge branch 'develop' of github.com:EXreaction/phpbb3 into ticket/11103
Diffstat (limited to 'phpBB/includes/request/request.php')
-rw-r--r--phpBB/includes/request/request.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/phpBB/includes/request/request.php b/phpBB/includes/request/request.php
index a06fc0d85d..ae3c526d89 100644
--- a/phpBB/includes/request/request.php
+++ b/phpBB/includes/request/request.php
@@ -34,6 +34,7 @@ class phpbb_request implements phpbb_request_interface
phpbb_request_interface::REQUEST => '_REQUEST',
phpbb_request_interface::COOKIE => '_COOKIE',
phpbb_request_interface::SERVER => '_SERVER',
+ phpbb_request_interface::FILES => '_FILES',
);
/**
@@ -269,6 +270,19 @@ class phpbb_request implements phpbb_request_interface
}
/**
+ * Shortcut method to retrieve $_FILES variables
+ *
+ * @param string $form_name The name of the file input form element
+ *
+ * @return array The uploaded file's information or an empty array if the
+ * variable does not exist in _FILES.
+ */
+ public function file($form_name)
+ {
+ return $this->variable($form_name, array('name' => 'none'), false, phpbb_request_interface::FILES);
+ }
+
+ /**
* Checks whether a certain variable was sent via POST.
* To make sure that a request was sent using POST you should call this function
* on at least one variable.