diff options
| author | Stanislav Malyshev <stas@php.net> | 2008-03-12 20:24:45 +0000 |
|---|---|---|
| committer | Stanislav Malyshev <stas@php.net> | 2008-03-12 20:24:45 +0000 |
| commit | a9fe1010d2837cb2a02ef70156718603c3693cbd (patch) | |
| tree | 2c09dc45fcc8ae2735e14f657817d849640c11fd /main | |
| parent | 5076296d8cf5f592a66d309fdd6747096ffc4dae (diff) | |
| download | php-git-a9fe1010d2837cb2a02ef70156718603c3693cbd.tar.gz | |
[DOC] add request_order INI variable to control $_REQUEST content
# if not set (default), variables_order still is used
# request_order accepts G,P and C
Diffstat (limited to 'main')
| -rw-r--r-- | main/main.c | 1 | ||||
| -rw-r--r-- | main/php_globals.h | 2 | ||||
| -rw-r--r-- | main/php_variables.c | 8 |
3 files changed, 10 insertions, 1 deletions
diff --git a/main/main.c b/main/main.c index 7098a9aaeb..3f56d17568 100644 --- a/main/main.c +++ b/main/main.c @@ -436,6 +436,7 @@ PHP_INI_BEGIN() STD_PHP_INI_ENTRY("user_dir", NULL, PHP_INI_SYSTEM, OnUpdateString, user_dir, php_core_globals, core_globals) STD_PHP_INI_ENTRY("variables_order", "EGPCS", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateStringUnempty, variables_order, php_core_globals, core_globals) + STD_PHP_INI_ENTRY("request_order", NULL, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateString, request_order, php_core_globals, core_globals) STD_PHP_INI_ENTRY("error_append_string", NULL, PHP_INI_ALL, OnUpdateString, error_append_string, php_core_globals, core_globals) STD_PHP_INI_ENTRY("error_prepend_string", NULL, PHP_INI_ALL, OnUpdateString, error_prepend_string, php_core_globals, core_globals) diff --git a/main/php_globals.h b/main/php_globals.h index fec2e94bfd..0c9ccff5df 100644 --- a/main/php_globals.h +++ b/main/php_globals.h @@ -162,6 +162,8 @@ struct _php_core_globals { char *user_ini_filename; long user_ini_cache_ttl; + + char *request_order; }; diff --git a/main/php_variables.c b/main/php_variables.c index 650b5f0219..274230fe41 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -835,7 +835,13 @@ static zend_bool php_auto_globals_create_request(char *name, uint name_len TSRML array_init(form_variables); INIT_PZVAL(form_variables); - for (p = PG(variables_order); p && *p; p++) { + if(PG(request_order) != NULL) { + p = PG(request_order); + } else { + p = PG(variables_order); + } + + for (; p && *p; p++) { switch (*p) { case 'g': case 'G': |
