Update uri.php

This commit is contained in:
Namhyeon Go 2018-04-14 23:45:33 +09:00 committed by GitHub
parent 7e6d69a5f5
commit 4201633c00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,28 +111,12 @@ if(!function_exists("read_requests")) {
}
if(!function_exists("get_requested_value")) {
function get_requested_value($name, $scope="all", $escape_quotes=true, $escape_tags=false) {
function get_requested_value($name, $method="_ALL", $escape_quotes=true, $escape_tags=false) {
$value = "";
$requests = get_requests();
$value = "";
$method = "";
switch($scope) {
case "all":
$method = "_ALL";
break;
case "post":
$method = "_POST";
break;
case "get":
$method = "_GET";
break;
default:
$method = "";
}
// set validated value
if(!empty($method)) {
if(array_key_exists($method, $requests)) {
$value = array_key_empty($name, $requests[$method]) ? $value : $requests[$method][$name];
if(is_string($value)) {