summaryrefslogtreecommitdiff
path: root/ext/mbstring/mbstring.c
diff options
context:
space:
mode:
authorMark A. Hershberger <mah@debian.(none)>2009-03-25 00:38:30 -0400
committerMark A. Hershberger <mah@debian.(none)>2009-03-25 00:38:30 -0400
commit1f589a2bd44ba835ad1b009a5d83abd453724829 (patch)
treeec84d715d1ff049cc61f5eaf18db21eb7f3bab40 /ext/mbstring/mbstring.c
parentbb01389fbd53ec1cbcb80d0681a37cca1267891a (diff)
downloadphp-1f589a2bd44ba835ad1b009a5d83abd453724829.tar.gz
Imported Upstream version 5.2.5upstream/5.2.5
Diffstat (limited to 'ext/mbstring/mbstring.c')
-rw-r--r--ext/mbstring/mbstring.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index 56f2c2f42..d269a2225 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mbstring.c,v 1.224.2.22.2.24 2007/07/12 15:31:54 masugata Exp $ */
+/* $Id: mbstring.c,v 1.224.2.22.2.25 2007/09/24 11:51:36 hirokawa Exp $ */
/*
* PHP 4 Multibyte String module "mbstring"
@@ -712,6 +712,9 @@ static PHP_INI_MH(OnUpdate_mbstring_substitute_character)
} else if (strcasecmp("long", new_value) == 0) {
MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG;
MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG;
+ } else if (strcasecmp("entity", new_value) == 0) {
+ MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY;
+ MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY;
} else {
MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR;
MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR;
@@ -1329,6 +1332,8 @@ PHP_FUNCTION(mb_substitute_character)
RETVAL_STRING("none", 1);
} else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG) {
RETVAL_STRING("long", 1);
+ } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY) {
+ RETVAL_STRING("entity", 1);
} else {
RETVAL_LONG(MBSTRG(current_filter_illegal_substchar));
}
@@ -1340,6 +1345,8 @@ PHP_FUNCTION(mb_substitute_character)
MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE;
} else if (strcasecmp("long", Z_STRVAL_PP(arg1)) == 0) {
MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG;
+ } else if (strcasecmp("entity", Z_STRVAL_PP(arg1)) == 0) {
+ MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY;
} else {
convert_to_long_ex(arg1);
if (Z_LVAL_PP(arg1)< 0xffff && Z_LVAL_PP(arg1)> 0x0) {
@@ -3890,6 +3897,8 @@ PHP_FUNCTION(mb_get_info)
add_assoc_string(return_value, "substitute_character", "none", 1);
} else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG) {
add_assoc_string(return_value, "substitute_character", "long", 1);
+ } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY) {
+ add_assoc_string(return_value, "substitute_character", "entity", 1);
} else {
add_assoc_long(return_value, "substitute_character", MBSTRG(current_filter_illegal_substchar));
}
@@ -3984,6 +3993,8 @@ PHP_FUNCTION(mb_get_info)
RETVAL_STRING("none", 1);
} else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG) {
RETVAL_STRING("long", 1);
+ } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY) {
+ RETVAL_STRING("entity", 1);
} else {
RETVAL_LONG(MBSTRG(current_filter_illegal_substchar));
}