]> granicus.if.org Git - php/commitdiff
Fix prototypes for ldap_control_paged_result and fix function name in tests
authorScott MacVicar <scottmac@php.net>
Thu, 14 Jul 2011 18:49:12 +0000 (18:49 +0000)
committerScott MacVicar <scottmac@php.net>
Thu, 14 Jul 2011 18:49:12 +0000 (18:49 +0000)
ext/ldap/ldap.c
ext/ldap/tests/ldap_control_paged_results_variation1.phpt
ext/ldap/tests/ldap_control_paged_results_variation3.phpt

index 0ecb5ddf75bf7117d9d8a1d5b67899c61b85684b..790ef6bf545f8dd1a771abb863ac0634842f5b47 100644 (file)
@@ -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;
        }
index 72206660992547fe72944cd5c5275489031f14df..0e894464f4a23927b8911c1746518bb4dd485f96 100644 (file)
@@ -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 <jeanseb@au-fil-du.net>
 --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)
 );
index b5f3a7218b36cb731dda1a19b117976ad6580f8b..43a68aea79dcca223aa001a1100e03b38c47bf02 100644 (file)
@@ -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 <jeanseb@au-fil-du.net>
 --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)
 );