~clint-fewbar/ubuntu/natty/php5/merge-5.3.3-3

« back to all changes in this revision

Viewing changes to ext/ldap/ldap.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-01-26 14:09:58 UTC
  • mfrom: (1.1.16 upstream) (0.3.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100126140958-sos69zwa00q2nt19
Tags: 5.2.12.dfsg.1-2ubuntu1
* Merge from debian testing.  Remaining changes:
  - debian/control, debian/rules: Disable a few build dependencies and
    accompanying binary packages which we do not want to support in main:
    + firebird2-dev/php5-interbase (we have a seperate php-interbase source)
    + libc-client/php5-imap (we have a seperate php-imap source)
    + libmcrypt-dev/php5-mcrypt (seperate php-mcrypt source)
    + readline support again, now that the libedit issue is fixed.
  - debian/control: Add build dependency: libedit-dev (>= 2.9.cvs.20050518-1)
    CLI readline support.
  - debian/rules:
    + Correctly mangle PHP5_* macros for lpia
  - debian/control:
    + Rename Vcs-Browser & Vcs-Git to XS-Original-Vcs-Browser & XS-Original-Vcs-Git (LP: #323731).
  - debian/control: Move php5-suhoshin to Suggests.
  - debian/rules: Fix broken symlink for pear.
  - main/php_version.h: updated with Ubuntu version info
  - debian/patches/series: Re-enable the 033-we_WANT_libtool.patch patch
  - debian/rules, debian/source_php5.py: Install apport hook. 
* Dropped patches: CVE-2009-3557.patch and CVE-2009-3558.patch, no longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
   +----------------------------------------------------------------------+
24
24
 */
25
25
 
26
 
/* $Id: ldap.c 287936 2009-09-01 08:42:10Z patrickallaert $ */
 
26
/* $Id: ldap.c 290923 2009-11-18 17:44:58Z jani $ */
27
27
#define IS_EXT_MODULE
28
28
 
29
29
#ifdef HAVE_CONFIG_H
323
323
 
324
324
        php_info_print_table_start();
325
325
        php_info_print_table_row(2, "LDAP Support", "enabled");
326
 
        php_info_print_table_row(2, "RCS Version", "$Id: ldap.c 287936 2009-09-01 08:42:10Z patrickallaert $");
 
326
        php_info_print_table_row(2, "RCS Version", "$Id: ldap.c 290923 2009-11-18 17:44:58Z jani $");
327
327
 
328
328
        if (LDAPG(max_links) == -1) {
329
329
                snprintf(tmp, 31, "%ld/unlimited", LDAPG(num_links));
1061
1061
        ldap = ld->link;
1062
1062
        num_entries = ldap_count_entries(ldap, ldap_result);
1063
1063
 
1064
 
        if (num_entries == 0) return;
 
1064
        array_init(return_value);
 
1065
        add_assoc_long(return_value, "count", num_entries);
 
1066
 
 
1067
        if (num_entries == 0) {
 
1068
                return;
 
1069
        }
 
1070
        
 
1071
        ldap_result_entry = ldap_first_entry(ldap, ldap_result);
 
1072
        if (ldap_result_entry == NULL) {
 
1073
                zval_dtor(return_value);
 
1074
                RETURN_FALSE;
 
1075
        }
 
1076
 
1065
1077
        num_entries = 0;
1066
 
        
1067
 
        ldap_result_entry = ldap_first_entry(ldap, ldap_result);
1068
 
        if (ldap_result_entry == NULL) RETURN_FALSE;
1069
 
 
1070
 
        array_init(return_value);
1071
 
        add_assoc_long(return_value, "count", num_entries);
1072
 
 
1073
1078
        while (ldap_result_entry != NULL) {
1074
 
 
1075
1079
                MAKE_STD_ZVAL(tmp1);
1076
1080
                array_init(tmp1);
1077
1081