From badd6a91d4c0001223abbe80a53f551642bd43f1 Mon Sep 17 00:00:00 2001 From: George Wang Date: Wed, 16 Nov 2011 03:44:42 +0000 Subject: [PATCH] keep PHP_5_4 in sync with PHP_5_3 branch --- sapi/litespeed/lsapi_main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c index 76c77fcefa..de1d0948b0 100644 --- a/sapi/litespeed/lsapi_main.c +++ b/sapi/litespeed/lsapi_main.c @@ -225,6 +225,7 @@ static int add_variable( const char * pKey, int keyLen, const char * pValue, int } +#if ((PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || PHP_MAJOR_VERSION < 5) static int add_variable_magic_quote( const char * pKey, int keyLen, const char * pValue, int valLen, void * arg ) { @@ -244,6 +245,8 @@ static int add_variable_magic_quote( const char * pKey, int keyLen, const char * return 1; } +#endif + /* {{{ sapi_lsapi_register_variables */ static void sapi_lsapi_register_variables(zval *track_vars_array TSRMLS_DC) @@ -253,15 +256,19 @@ static void sapi_lsapi_register_variables(zval *track_vars_array TSRMLS_DC) if ( (SG(request_info).request_uri ) ) php_self = (SG(request_info).request_uri ); +#if ((PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || PHP_MAJOR_VERSION < 5) if (!PG(magic_quotes_gpc)) { +#endif LSAPI_ForeachHeader( add_variable, track_vars_array ); LSAPI_ForeachEnv( add_variable, track_vars_array ); add_variable("PHP_SELF", 8, php_self, strlen( php_self ), track_vars_array ); +#if ((PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || PHP_MAJOR_VERSION < 5) } else { LSAPI_ForeachHeader( add_variable_magic_quote, track_vars_array ); LSAPI_ForeachEnv( add_variable_magic_quote, track_vars_array ); add_variable_magic_quote("PHP_SELF", 8, php_self, strlen( php_self ), track_vars_array ); } +#endif php_import_environment_variables(track_vars_array TSRMLS_CC); } else { php_import_environment_variables(track_vars_array TSRMLS_CC); @@ -344,7 +351,7 @@ static int sapi_lsapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) /* {{{ sapi_lsapi_send_headers */ -static void sapi_lsapi_log_message(char *message) +static void sapi_lsapi_log_message(char *message TSRMLS_DC) { int len = strlen( message ); LSAPI_Write_Stderr( message, len); -- 2.50.1