[PHP-CVS] cvs: php-src / README.input_filter

2005-12-05 Thread Jani Taskinen
sniper  Mon Dec  5 21:30:06 2005 EDT

  Modified files:  
/php-srcREADME.input_filter 
  Log:
  - Fix docs
  
http://cvs.php.net/diff.php/php-src/README.input_filter?r1=1.7r2=1.8ty=u
Index: php-src/README.input_filter
diff -u php-src/README.input_filter:1.7 php-src/README.input_filter:1.8
--- php-src/README.input_filter:1.7 Thu Jun 24 04:49:00 2004
+++ php-src/README.input_filter Mon Dec  5 21:30:04 2005
@@ -34,7 +34,7 @@
 
 ZEND_DECLARE_MODULE_GLOBALS(my_input_filter)
 
-function_entry my_input_filter_functions[] = {
+zend_function_entry my_input_filter_functions[] = {
 PHP_FE(my_get_raw,   NULL)
 {NULL, NULL, NULL}
 };
@@ -85,7 +85,7 @@
 {
 php_info_print_table_start();
 php_info_print_table_row( 2, My Input Filter Support, enabled );
-php_info_print_table_row( 2, Revision, $Revision: 1.7 $);
+php_info_print_table_row( 2, Revision, $Revision: 1.8 $);
 php_info_print_table_end();
 }
 

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



[PHP-CVS] cvs: php-src / README.input_filter

2004-06-24 Thread Stefan Esser
sesser  Thu Jun 24 04:49:00 2004 EDT

  Modified files:  
/php-srcREADME.input_filter 
  Log:
  Fixed zend_parse_parameters arguments...
  
  
  
http://cvs.php.net/diff.php/php-src/README.input_filter?r1=1.6r2=1.7ty=u
Index: php-src/README.input_filter
diff -u php-src/README.input_filter:1.6 php-src/README.input_filter:1.7
--- php-src/README.input_filter:1.6 Sun Feb  8 17:49:47 2004
+++ php-src/README.input_filter Thu Jun 24 04:49:00 2004
@@ -85,7 +85,7 @@
 {
 php_info_print_table_start();
 php_info_print_table_row( 2, My Input Filter Support, enabled );
-php_info_print_table_row( 2, Revision, $Revision: 1.6 $);
+php_info_print_table_row( 2, Revision, $Revision: 1.7 $);
 php_info_print_table_end();
 }
 
@@ -155,7 +155,7 @@
 HashTable *hash_ptr;
 char *raw_var;
 
-if(zend_parse_parameters(2 TSRMLS_CC, ls|l, arg, var, var_len) == FAILURE) {
+if(zend_parse_parameters(2 TSRMLS_CC, ls, arg, var, var_len) == FAILURE) {
 return;
 }
 

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



[PHP-CVS] cvs: php-src / README.input_filter

2003-11-30 Thread Derick Rethans
derick  Sun Nov 30 15:13:04 2003 EDT

  Modified files:  
/php-srcREADME.input_filter 
  Log:
  - And fix the README too.
  
  
Index: php-src/README.input_filter
diff -u php-src/README.input_filter:1.4 php-src/README.input_filter:1.5
--- php-src/README.input_filter:1.4 Sat Nov 29 10:30:50 2003
+++ php-src/README.input_filter Sun Nov 30 15:13:03 2003
@@ -85,7 +85,7 @@
 {
 php_info_print_table_start();
 php_info_print_table_row( 2, My Input Filter Support, enabled );
-php_info_print_table_row( 2, Revision, $Revision: 1.4 $);
+php_info_print_table_row( 2, Revision, $Revision: 1.5 $);
 php_info_print_table_end();
 }
 
@@ -93,7 +93,7 @@
  * (modified) variable. Returning 0 prevents PHP from registering the variable;
  * you can use this if your filter already registers the variable under a
  * different name, or if you just don't want the variable registered at all. */
-unsigned int  my_sapi_input_filter(int arg, char *var, char **val, unsigned int 
val_len, unsigned int *new_val_len)
+SAPI_INPUT_FILTER_FUNC(my_sapi_input_filter)
 {
 zval new_var;
 zval *array_ptr = NULL;

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



[PHP-CVS] cvs: php-src / README.input_filter /ext/mbstring mb_gpc.c /main SAPI.c SAPI.h php_variables.c rfc1867.c

2003-11-29 Thread Derick Rethans
derick  Sat Nov 29 10:24:35 2003 EDT

  Modified files:  
/php-srcREADME.input_filter 
/php-src/ext/mbstring   mb_gpc.c 
/php-src/main   SAPI.c SAPI.h php_variables.c rfc1867.c 
  Log:
  - Fix sapi_input_filter patch. Returning 1 from the filter handler should
make PHP register the variable, returning 0 shouldn't. The new length of
the variables being filtered is now returned in the new_val_len argument
of the function.
  
  
Index: php-src/README.input_filter
diff -u php-src/README.input_filter:1.2 php-src/README.input_filter:1.3
--- php-src/README.input_filter:1.2 Thu Feb 20 17:21:46 2003
+++ php-src/README.input_filter Sat Nov 29 10:24:33 2003
@@ -85,11 +85,11 @@
 {
 php_info_print_table_start();
 php_info_print_table_row( 2, My Input Filter Support, enabled );
-php_info_print_table_row( 2, Revision, $Revision: 1.2 $);
+php_info_print_table_row( 2, Revision, $Revision: 1.3 $);
 php_info_print_table_end();
 }
 
-unsigned int  my_sapi_input_filter(int arg, char *var, char **val, unsigned int 
val_len)
+unsigned int  my_sapi_input_filter(int arg, char *var, char **val, unsigned int 
val_len, unsigned int *new_val_len)
 {
 zval new_var;
 zval *array_ptr = NULL;
@@ -137,7 +137,8 @@
 
 php_strip_tags(*val, val_len, NULL, NULL, 0);
 
-return strlen(*val);
+*new_val_len = strlen(*val);
+   return 1;
 }
 
 PHP_FUNCTION(my_get_raw)
Index: php-src/ext/mbstring/mb_gpc.c
diff -u php-src/ext/mbstring/mb_gpc.c:1.8 php-src/ext/mbstring/mb_gpc.c:1.9
--- php-src/ext/mbstring/mb_gpc.c:1.8   Sat Aug 23 04:59:47 2003
+++ php-src/ext/mbstring/mb_gpc.c   Sat Nov 29 10:24:34 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mb_gpc.c,v 1.8 2003/08/23 08:59:47 hirokawa Exp $ */
+/* $Id: mb_gpc.c,v 1.9 2003/11/29 15:24:34 derick Exp $ */
 
 /* {{{ includes */
 #ifdef HAVE_CONFIG_H
@@ -204,7 +204,8 @@
char *var, *val, *s1, *s2;
char *strtok_buf = NULL, **val_list = NULL;
zval *array_ptr = (zval *) arg;
-   int n, num, val_len, *len_list = NULL, *elist, elistsz;
+   int n, num, *len_list = NULL, *elist, elistsz;
+   unsigned int val_len, new_val_len;
enum mbfl_no_encoding from_encoding, to_encoding;
mbfl_string string, resvar, resval;
mbfl_encoding_detector *identd = NULL; 
@@ -342,9 +343,10 @@
val_len = len_list[n];
}
n++;
-   val_len = sapi_module.input_filter(data_type, var, val, val_len 
TSRMLS_CC);
-   /* add variable to symbol table */
-   php_register_variable_safe(var, val, val_len, array_ptr TSRMLS_CC);
+   if (sapi_module.input_filter(data_type, var, val, val_len, 
new_val_len TSRMLS_CC)) {
+   /* add variable to symbol table */
+   php_register_variable_safe(var, val, new_val_len, array_ptr 
TSRMLS_CC);
+   }
if (convd != NULL){
mbfl_string_clear(resvar);
mbfl_string_clear(resval);
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.180 php-src/main/SAPI.c:1.181
--- php-src/main/SAPI.c:1.180   Sat Nov 22 16:10:47 2003
+++ php-src/main/SAPI.c Sat Nov 29 10:24:34 2003
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.180 2003/11/22 21:10:47 sesser Exp $ */
+/* $Id: SAPI.c,v 1.181 2003/11/29 15:24:34 derick Exp $ */
 
 #include ctype.h
 #include sys/stat.h
@@ -831,7 +831,7 @@
return SUCCESS;
 }
 
-SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char 
*var, char **val, unsigned int val_len TSRMLS_DC))
+SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char 
*var, char **val, unsigned int val_len, unsigned int *new_val_len TSRMLS_DC))
 {
sapi_module.input_filter = input_filter;
return SUCCESS;
Index: php-src/main/SAPI.h
diff -u php-src/main/SAPI.h:1.105 php-src/main/SAPI.h:1.106
--- php-src/main/SAPI.h:1.105   Tue Sep  2 09:34:23 2003
+++ php-src/main/SAPI.h Sat Nov 29 10:24:35 2003
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: SAPI.h,v 1.105 2003/09/02 13:34:23 abies Exp $ */
+/* $Id: SAPI.h,v 1.106 2003/11/29 15:24:35 derick Exp $ */
 
 #ifndef SAPI_H
 #define SAPI_H
@@ -181,7 +181,7 @@
 SAPI_API void sapi_unregister_post_entry(sapi_post_entry *post_entry);
 SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(TSRMLS_D));
 SAPI_API int sapi_register_treat_data(void (*treat_data)(int arg, char *str, zval 
*destArray TSRMLS_DC));
-SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char 
*var, char **val, unsigned int val_len TSRMLS_DC));
+SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int