iliaa                                    Mon, 16 Nov 2009 13:34:57 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=290820

Log:
Simpify the max_file_uploads handling code

Changed paths:
    U   php/php-src/branches/PHP_5_2/main/rfc1867.c
    U   php/php-src/branches/PHP_5_3/main/rfc1867.c
    U   php/php-src/trunk/main/rfc1867.c

Modified: php/php-src/branches/PHP_5_2/main/rfc1867.c
===================================================================
--- php/php-src/branches/PHP_5_2/main/rfc1867.c 2009-11-16 13:34:48 UTC (rev 
290819)
+++ php/php-src/branches/PHP_5_2/main/rfc1867.c 2009-11-16 13:34:57 UTC (rev 
290820)
@@ -795,13 +795,8 @@
        zend_llist header;
        void *event_extra_data = NULL;
        int llen = 0;
-       char *max_uploads = INI_STR("max_file_uploads");
-       int upload_cnt = 0;
+       int upload_cnt = INI_INT("max_file_uploads");

-       if (max_uploads && *max_uploads) {
-               upload_cnt = atoi(max_uploads);
-       }
-
        if (SG(request_info).content_length > SG(post_max_size)) {
                sapi_module.sapi_error(E_WARNING, "POST Content-Length of %ld 
bytes exceeds the limit of %ld bytes", SG(request_info).content_length, 
SG(post_max_size));
                return;

Modified: php/php-src/branches/PHP_5_3/main/rfc1867.c
===================================================================
--- php/php-src/branches/PHP_5_3/main/rfc1867.c 2009-11-16 13:34:48 UTC (rev 
290819)
+++ php/php-src/branches/PHP_5_3/main/rfc1867.c 2009-11-16 13:34:57 UTC (rev 
290820)
@@ -795,13 +795,8 @@
        zend_llist header;
        void *event_extra_data = NULL;
        int llen = 0;
-       char *max_uploads = INI_STR("max_file_uploads");
-       int upload_cnt = 0;
+       int upload_cnt = INI_INT("max_file_uploads");

-       if (max_uploads && *max_uploads) {
-               upload_cnt = atoi(max_uploads);
-       }
-
        if (SG(request_info).content_length > SG(post_max_size)) {
                sapi_module.sapi_error(E_WARNING, "POST Content-Length of %ld 
bytes exceeds the limit of %ld bytes", SG(request_info).content_length, 
SG(post_max_size));
                return;

Modified: php/php-src/trunk/main/rfc1867.c
===================================================================
--- php/php-src/trunk/main/rfc1867.c    2009-11-16 13:34:48 UTC (rev 290819)
+++ php/php-src/trunk/main/rfc1867.c    2009-11-16 13:34:57 UTC (rev 290820)
@@ -594,13 +594,8 @@
        zend_llist header;
        void *event_extra_data = NULL;
        int llen = 0;
-       char *max_uploads = INI_STR("max_file_uploads");
-       int upload_cnt = 0;
+       int upload_cnt = INI_INT("max_file_uploads");

-       if (max_uploads && *max_uploads) {
-               upload_cnt = atoi(max_uploads);
-       }
-
        if (SG(request_info).content_length > SG(post_max_size)) {
                sapi_module.sapi_error(E_WARNING, "POST Content-Length of %ld 
bytes exceeds the limit of %ld bytes", SG(request_info).content_length, 
SG(post_max_size));
                return;

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

Reply via email to