com php-src: Added constants for standard EXOPs: ext/ldap/ldap.c ext/ldap/tests/ldap_exop.phpt

From: Date: Mon, 03 Jul 2017 08:58:13 +0000
Subject: com php-src: Added constants for standard EXOPs: ext/ldap/ldap.c ext/ldap/tests/ldap_exop.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-98385@lists.php.net to get a copy of this message
Commit: 9aa99cc34cdecfa052a06835c40faf9c8c1a1157 Author: Côme Chilliet <mcmic@php.net> Mon, 26 Jun 2017 14:57:04 +0200 Parents: 4652c462452e1736e1f740e83e2cb2a492b27d13 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9aa99cc34cdecfa052a06835c40faf9c8c1a1157 Log: Added constants for standard EXOPs Changed paths: M ext/ldap/ldap.c M ext/ldap/tests/ldap_exop..phpt Diff: diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index a706c71..19340d1 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -283,6 +283,14 @@ PHP_MINIT_FUNCTION(ldap) REGISTER_LONG_CONSTANT("LDAP_ESCAPE_FILTER", PHP_LDAP_ESCAPE_FILTER, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("LDAP_ESCAPE_DN", PHP_LDAP_ESCAPE_DN, CONST_PERSISTENT | CONST_CS); +#ifdef HAVE_LDAP_EXTENDED_OPERATION_S + REGISTER_STRING_CONSTANT("LDAP_EXOP_START_TLS", LDAP_EXOP_START_TLS, CONST_PERSISTENT | CONST_CS); + REGISTER_STRING_CONSTANT("LDAP_EXOP_MODIFY_PASSWD", LDAP_EXOP_MODIFY_PASSWD, CONST_PERSISTENT | CONST_CS); + REGISTER_STRING_CONSTANT("LDAP_EXOP_REFRESH", LDAP_EXOP_REFRESH, CONST_PERSISTENT | CONST_CS); + REGISTER_STRING_CONSTANT("LDAP_EXOP_WHO_AM_I", LDAP_EXOP_WHO_AM_I, CONST_PERSISTENT | CONST_CS); + REGISTER_STRING_CONSTANT("LDAP_EXOP_TURN", LDAP_EXOP_TURN, CONST_PERSISTENT | CONST_CS); +#endif + le_link = zend_register_list_destructors_ex(_close_ldap_link, NULL, "ldap link", module_number); le_result = zend_register_list_destructors_ex(_free_ldap_result, NULL, "ldap result", module_number); le_result_entry = zend_register_list_destructors_ex(_free_ldap_result_entry, NULL, "ldap result entry", module_number); diff --git a/ext/ldap/tests/ldap_exop.phpt b/ext/ldap/tests/ldap_exop.phpt index 883bfa5..5f93a02 100644 --- a/ext/ldap/tests/ldap_exop.phpt +++ b/ext/ldap/tests/ldap_exop.phpt @@ -23,10 +23,10 @@ function ber_encode($string) { // ldap_exop(resource link, string reqoid [, string reqdata [, string retoid [, string retdata]]]) // bool ldap_parse_exop(resource link, resource result [, string retoid [, string retdata]]) var_dump( - ldap_exop($link, "1.3.6.1.4.1.4203.1.11.3", NULL, $retoid, $retdata), + ldap_exop($link, LDAP_EXOP_WHO_AM_I, NULL, $retoid, $retdata), $retdata, $retoid, - $r = ldap_exop($link, "1.3.6.1.4.1.4203.1.11.3"), + $r = ldap_exop($link, LDAP_EXOP_WHO_AM_I), ldap_parse_exop($link, $r, $retoid2, $retdata2), $retdata2, $retoid2

« previous php.cvs (#98385) next »