stas            Wed Mar 12 20:24:45 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src    php.ini-dist php.ini-recommended 
    /php-src/main       main.c php_globals.h php_variables.c 
  Log:
  [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
  
  
http://cvs.php.net/viewvc.cgi/php-src/php.ini-dist?r1=1.231.2.10.2.22.2.3&r2=1.231.2.10.2.22.2.4&diff_format=u
Index: php-src/php.ini-dist
diff -u php-src/php.ini-dist:1.231.2.10.2.22.2.3 
php-src/php.ini-dist:1.231.2.10.2.22.2.4
--- php-src/php.ini-dist:1.231.2.10.2.22.2.3    Thu Feb 21 13:36:35 2008
+++ php-src/php.ini-dist        Wed Mar 12 20:24:45 2008
@@ -413,6 +413,12 @@
 ; values override older values.
 variables_order = "EGPCS"
 
+; This directive describes the order in which PHP registers GET, POST and 
Cookie
+; variables into the _REQUEST array. Registration is done from left to right, 
+; newer values override older values.
+; If this directive is not set, variables_order is used for _REQUEST contents.
+; request_order = "GP"
+
 ; Whether or not to register the EGPCS variables as global variables.  You may
 ; want to turn this off if you don't want to clutter your scripts' global scope
 ; with user data.  This makes most sense when coupled with track_vars - in 
which
http://cvs.php.net/viewvc.cgi/php-src/php.ini-recommended?r1=1.179.2.11.2.23.2.3&r2=1.179.2.11.2.23.2.4&diff_format=u
Index: php-src/php.ini-recommended
diff -u php-src/php.ini-recommended:1.179.2.11.2.23.2.3 
php-src/php.ini-recommended:1.179.2.11.2.23.2.4
--- php-src/php.ini-recommended:1.179.2.11.2.23.2.3     Thu Feb 21 13:36:35 2008
+++ php-src/php.ini-recommended Wed Mar 12 20:24:45 2008
@@ -464,6 +464,12 @@
 ; values override older values.
 variables_order = "GPCS"
 
+; This directive describes the order in which PHP registers GET, POST and 
Cookie
+; variables into the _REQUEST array. Registration is done from left to right, 
+; newer values override older values.
+; If this directive is not set, variables_order is used for _REQUEST contents.
+request_order = "GP"
+
 ; Whether or not to register the EGPCS variables as global variables.  You may
 ; want to turn this off if you don't want to clutter your scripts' global scope
 ; with user data.  This makes most sense when coupled with track_vars - in 
which
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.12&r2=1.640.2.23.2.57.2.13&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.12 
php-src/main/main.c:1.640.2.23.2.57.2.13
--- php-src/main/main.c:1.640.2.23.2.57.2.12    Sat Mar  8 22:12:32 2008
+++ php-src/main/main.c Wed Mar 12 20:24:45 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.12 2008/03/08 22:12:32 colder Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.13 2008/03/12 20:24:45 stas Exp $ */
 
 /* {{{ includes
  */
@@ -436,6 +436,7 @@
 
        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)
http://cvs.php.net/viewvc.cgi/php-src/main/php_globals.h?r1=1.98.2.1.2.7.2.3&r2=1.98.2.1.2.7.2.4&diff_format=u
Index: php-src/main/php_globals.h
diff -u php-src/main/php_globals.h:1.98.2.1.2.7.2.3 
php-src/main/php_globals.h:1.98.2.1.2.7.2.4
--- php-src/main/php_globals.h:1.98.2.1.2.7.2.3 Sat Mar  8 22:12:32 2008
+++ php-src/main/php_globals.h  Wed Mar 12 20:24:45 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_globals.h,v 1.98.2.1.2.7.2.3 2008/03/08 22:12:32 colder Exp $ */
+/* $Id: php_globals.h,v 1.98.2.1.2.7.2.4 2008/03/12 20:24:45 stas Exp $ */
 
 #ifndef PHP_GLOBALS_H
 #define PHP_GLOBALS_H
@@ -162,6 +162,8 @@
 
        char *user_ini_filename;
        long user_ini_cache_ttl;
+
+       char *request_order;
 };
 
 
http://cvs.php.net/viewvc.cgi/php-src/main/php_variables.c?r1=1.104.2.10.2.11.2.3&r2=1.104.2.10.2.11.2.4&diff_format=u
Index: php-src/main/php_variables.c
diff -u php-src/main/php_variables.c:1.104.2.10.2.11.2.3 
php-src/main/php_variables.c:1.104.2.10.2.11.2.4
--- php-src/main/php_variables.c:1.104.2.10.2.11.2.3    Mon Dec 31 07:17:17 2007
+++ php-src/main/php_variables.c        Wed Mar 12 20:24:45 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_variables.c,v 1.104.2.10.2.11.2.3 2007/12/31 07:17:17 sebastian 
Exp $ */
+/* $Id: php_variables.c,v 1.104.2.10.2.11.2.4 2008/03/12 20:24:45 stas Exp $ */
 
 #include <stdio.h>
 #include "php.h"
@@ -835,7 +835,13 @@
        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':



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to