Permalink
Browse files

- Update NEWS and README for input_filters

  • Loading branch information...
Derick Rethans
Derick Rethans committed Nov 29, 2003
1 parent 750b033 commit 350d755e33e836769d9447231206bdaa9110e072
Showing with 7 additions and 1 deletion.
  1. +2 −0 NEWS
  2. +5 −1 README.input_filter
View
2 NEWS
@@ -2,6 +2,8 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Oct 2003, PHP 5 Beta 3
- Added possibility to call PHP functions as XSLT-functions. (Christian)
+- Added possibility to prevent PHP from regustering variables when
+ input filter support is used. (Derick)
- Added new functions:
. dba_key_split() to split inifile keys in an array. (Marcus)
. time_nanosleep() signal safe sleep (Magnus, Ilia)
View
@@ -89,6 +89,10 @@ PHP_MINFO_FUNCTION(my_input_filter)
php_info_print_table_end();
}
+/* The filter handler. If you return 1 from it, then PHP also registers the
+ * (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)
{
zval new_var;
@@ -138,7 +142,7 @@ unsigned int my_sapi_input_filter(int arg, char *var, char **val, unsigned int
php_strip_tags(*val, val_len, NULL, NULL, 0);
*new_val_len = strlen(*val);
- return 1;
+ return 1;
}
PHP_FUNCTION(my_get_raw)

0 comments on commit 350d755

Please sign in to comment.