Add 'server' method to getFields and allow for method to be case insensitive
This commit is contained in:
parent
645431acd6
commit
d2cb488753
|
@ -435,11 +435,11 @@ function ehe($str) {
|
||||||
*/
|
*/
|
||||||
function getFields($fields, $requestOnly = false) {
|
function getFields($fields, $requestOnly = false) {
|
||||||
$vars = array();
|
$vars = array();
|
||||||
$methodType = array ("get", "post", "request", "files");
|
$methodType = array ("get", "post", "request", "files", "server");
|
||||||
|
|
||||||
foreach ($fields AS $name => $options) {
|
foreach ($fields AS $name => $options) {
|
||||||
if (in_array($options[0], $methodType) === false)
|
if (in_array(strtolower($options[0]), $methodType) === false)
|
||||||
die ("Illegal method type used for field " . $name . " : " . $options[0]);
|
die ("Unrecognized method type used for field " . $name . " : " . $options[0]);
|
||||||
|
|
||||||
if ($requestOnly === true)
|
if ($requestOnly === true)
|
||||||
$method = "_REQUEST";
|
$method = "_REQUEST";
|
||||||
|
|
Loading…
Reference in New Issue