Add 'server' method to getFields and allow for method to be case insensitive

This commit is contained in:
domi 2012-08-25 15:34:28 +00:00
parent 645431acd6
commit d2cb488753
1 changed files with 3 additions and 3 deletions

View File

@ -435,11 +435,11 @@ function ehe($str) {
*/
function getFields($fields, $requestOnly = false) {
$vars = array();
$methodType = array ("get", "post", "request", "files");
$methodType = array ("get", "post", "request", "files", "server");
foreach ($fields AS $name => $options) {
if (in_array($options[0], $methodType) === false)
die ("Illegal method type used for field " . $name . " : " . $options[0]);
if (in_array(strtolower($options[0]), $methodType) === false)
die ("Unrecognized method type used for field " . $name . " : " . $options[0]);
if ($requestOnly === true)
$method = "_REQUEST";