com php-src: make constant name more descriptive: UPGRADING ext/filter/filter.c ext/filter/filter_private.h ext/filte r/logical_filters.c
ext/filter/tests/058.phpt

From: Date: Mon, 18 Jul 2016 21:33:22 +0000
Subject: com php-src: make constant name more descriptive: UPGRADING ext/filter/filter.c ext/filter/filter_private.h ext/filte r/logical_filters.c
ext/filter/tests/058.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-93079@lists.php.net to get a copy of this message
Commit: 7f3375d5f28b1447ccc659e9867d67cf3bb86ba7 Author: Anatol Belski <ab@php.net> Mon, 18 Jul 2016 23:32:46 +0200 Parents: f5452b2b46ba4164977495a97df8ea1c92263d98 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7f3375d5f28b1447ccc659e9867d67cf3bb86ba7 Log: make constant name more descriptive Changed paths: M UPGRADING M ext/filter/filter.c M ext/filter/filter_private.h M ext/filter/logical_filters.c M ext/filter/tests/058.phpt Diff: diff --git a/UPGRADING b/UPGRADING index 1854e57..553b43f 100644 --- a/UPGRADING +++ b/UPGRADING @@ -146,8 +146,9 @@ PHP 7.1 UPGRADE NOTES - file_get_contents() accepts a negative seek offset if the stream is seekable. - tempnam() throws a notice when failing back to the system temp dir. - getopt() has an extra by-ref parameter : optind -- mb_ereg() and mb_ereg_replace() reject illegal byte sequences -- FILTER_FLAG_EMAIL_RFC6531 can be used with filter_var() for email validation +- mb_ereg() and mb_ereg_replace() reject illegal byte sequences. +- FILTER_FLAG_EMAIL_UNICODE can be used with filter_var() for email validation + according to RFC 6531. ======================================== 6. New Functions diff --git a/ext/filter/filter.c b/ext/filter/filter.c index 3d79a77..5991871 100644 --- a/ext/filter/filter..c +++ b/ext/filter/filter.c @@ -286,7 +286,7 @@ PHP_MINIT_FUNCTION(filter) REGISTER_LONG_CONSTANT("FILTER_FLAG_HOSTNAME", FILTER_FLAG_HOSTNAME, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("FILTER_FLAG_EMAIL_RFC6531", FILTER_FLAG_EMAIL_RFC6531, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("FILTER_FLAG_EMAIL_UNICODE", FILTER_FLAG_EMAIL_UNICODE, CONST_CS | CONST_PERSISTENT); sapi_register_input_filter(php_sapi_filter, php_sapi_filter_init); diff --git a/ext/filter/filter_private.h b/ext/filter/filter_private.h index ffce723..8a44370 100644 --- a/ext/filter/filter_private.h +++ b/ext/filter/filter_private.h @@ -57,7 +57,7 @@ #define FILTER_FLAG_HOSTNAME 0x100000 -#define FILTER_FLAG_EMAIL_RFC6531 0x100000 +#define FILTER_FLAG_EMAIL_UNICODE 0x100000 #define FILTER_VALIDATE_INT 0x0101 #define FILTER_VALIDATE_BOOLEAN 0x0102 diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c index 3a4a294..c1a8f54 100644 --- a/ext/filter/logical_filters.c +++ b/ext/filter/logical_filters.c @@ -609,7 +609,7 @@ void php_filter_validate_email(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ const char *regexp; size_t regexp_len; - if (flags & FILTER_FLAG_EMAIL_RFC6531) { + if (flags & FILTER_FLAG_EMAIL_UNICODE) { regexp = regexp0; regexp_len = sizeof(regexp0) - 1; } else { diff --git a/ext/filter/tests/058.phpt b/ext/filter/tests/058.phpt index a10f844..f3fa483 100644 --- a/ext/filter/tests/058.phpt +++ b/ext/filter/tests/058.phpt @@ -28,7 +28,7 @@ $values = Array( 'DžǼ੧ఘⅧ⒇৪@example.com', ); foreach ($values as $value) { - var_dump(filter_var($value, FILTER_VALIDATE_EMAIL, FILTER_FLAG_EMAIL_RFC6531)); + var_dump(filter_var($value, FILTER_VALIDATE_EMAIL, FILTER_FLAG_EMAIL_UNICODE)); } echo "Done\n"; ?>

« previous php.cvs (#93079) next »