From 1bc1d3572f56050c7063b84c9011d3af145f0439 Mon Sep 17 00:00:00 2001 From: Scott MacVicar Date: Thu, 14 Jul 2011 18:49:12 +0000 Subject: [PATCH] Fix prototypes for ldap_control_paged_result and fix function name in tests --- ext/ldap/ldap.c | 5 ++--- ext/ldap/tests/ldap_control_paged_results_variation1.phpt | 4 ++-- ext/ldap/tests/ldap_control_paged_results_variation3.phpt | 8 ++++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 0ecb5ddf75..790ef6bf54 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -2186,7 +2186,7 @@ PHP_FUNCTION(ldap_8859_to_t61) #endif #ifdef LDAP_CONTROL_PAGEDRESULTS -/* {{{ proto bool ldap_control_paged_result(resource link, int pagesize [, bool iscritical [, string cookie]]) +/* {{{ proto mixed ldap_control_paged_result(resource link, int pagesize [, bool iscritical [, string cookie]]) Inject paged results control*/ PHP_FUNCTION(ldap_control_paged_result) { @@ -2278,7 +2278,7 @@ lcpr_error_out: } /* }}} */ -/* {{{ proto bool ldap_control_paged_result_response(resource link, resource result [, string cookie [, int estimated]]) +/* {{{ proto bool ldap_control_paged_result_response(resource link, resource result [, string &cookie [, int &estimated]]) Extract paged results control response */ PHP_FUNCTION(ldap_control_paged_result_response) { @@ -2292,7 +2292,6 @@ PHP_FUNCTION(ldap_control_paged_result_response) ber_tag_t tag; int rc, lerrcode, myargcount = ZEND_NUM_ARGS(); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr|zz", &link, &result, &cookie, &estimated) != SUCCESS) { return; } diff --git a/ext/ldap/tests/ldap_control_paged_results_variation1.phpt b/ext/ldap/tests/ldap_control_paged_results_variation1.phpt index 7220666099..0e894464f4 100644 --- a/ext/ldap/tests/ldap_control_paged_results_variation1.phpt +++ b/ext/ldap/tests/ldap_control_paged_results_variation1.phpt @@ -1,5 +1,5 @@ --TEST-- -ldap_ldap_control_paged_results() test (fetching the first page) +ldap_ldap_control_paged_result() test (fetching the first page) --CREDITS-- Jean-Sebastien Hedde --SKIPIF-- @@ -17,7 +17,7 @@ insert_dummy_data($link); $dn = "dc=my-domain,dc=com"; $filter = "(cn=*)"; var_dump( - ldap_control_paged_results($link, 1), + ldap_control_paged_result($link, 1), $result = ldap_search($link, $dn, $filter, array('cn')), ldap_get_entries($link, $result) ); diff --git a/ext/ldap/tests/ldap_control_paged_results_variation3.phpt b/ext/ldap/tests/ldap_control_paged_results_variation3.phpt index b5f3a7218b..43a68aea79 100644 --- a/ext/ldap/tests/ldap_control_paged_results_variation3.phpt +++ b/ext/ldap/tests/ldap_control_paged_results_variation3.phpt @@ -1,5 +1,5 @@ --TEST-- -ldap_ldap_control_paged_results() test (fetching the first page then the next final page) +ldap_ldap_control_paged_result() test (fetching the first page then the next final page) --CREDITS-- Jean-Sebastien Hedde --SKIPIF-- @@ -18,11 +18,11 @@ $dn = "dc=my-domain,dc=com"; $filter = "(cn=*)"; $cookie = ''; var_dump( - ldap_control_paged_results($link, 2, true, $cookie), + ldap_control_paged_result($link, 2, true, $cookie), $result = ldap_search($link, $dn, $filter, array('cn')), ldap_get_entries($link, $result), - ldap_control_paged_results_response($link, $result, $cookie), - ldap_control_paged_results($link, 20, true, $cookie), + ldap_control_paged_result_response($link, $result, $cookie), + ldap_control_paged_result($link, 20, true, $cookie), $result = ldap_search($link, $dn, $filter, array('cn')), ldap_get_entries($link, $result) ); -- 2.40.0