diff options
| author | Colin Viebrock <cmv@php.net> | 2000-04-06 21:17:50 +0000 |
|---|---|---|
| committer | Colin Viebrock <cmv@php.net> | 2000-04-06 21:17:50 +0000 |
| commit | e4409a8556b47a212e5c0b850d3191b3541e7219 (patch) | |
| tree | 0ad7baea1ebfe85f65d421fb31578ff94d8a2b0e | |
| parent | a7c8bfb9fb2d20341181c3ab351fc436a4cc0e2a (diff) | |
| download | php-git-e4409a8556b47a212e5c0b850d3191b3541e7219.tar.gz | |
phpinfo() pretying
That should be everything.
| -rw-r--r-- | ext/ldap/ldap.c | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 5a59f1688d..0de522f58e 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -155,7 +155,7 @@ PHP_MSHUTDOWN_FUNCTION(ldap) PHP_MINFO_FUNCTION(ldap) { - char maxl[16]; + char maxl[32], tmp[32]; #if HAVE_NSLDAP LDAPVersion ver; double SDKVersion; @@ -169,33 +169,42 @@ PHP_MINFO_FUNCTION(ldap) #endif if (LDAPG(max_links) == -1) { - strcpy(maxl, "Unlimited"); + snprintf(maxl, 31, "%d/unlimited", LDAPG(num_links) ); } else { - snprintf(maxl, 15, "%ld", LDAPG(max_links)); - maxl[15] = 0; + snprintf(maxl, 31, "%d/%ld", LDAPG(num_links), LDAPG(max_links)); } + maxl[31] = 0; + + php_info_print_table_start(); + php_info_print_table_row(2, "LDAP Support", "enabled" ); + php_info_print_table_row(2, "RCS Version", "$Id$" ); + php_info_print_table_row(2, "Total Links", maxl ); - php_printf("<table>" - "<tr><td>Total links:</td><td>%d/%s</td></tr>\n" - "<tr><td>RCS Version:</td><td>$Id$</td></tr>\n" -#if HAVE_NSLDAP - "<tr><td>SDK Version:</td><td>%f</td></tr>" - "<tr><td>Highest LDAP Protocol Supported:</td><td>%f</td></tr>" - "<tr><td>SSL Level Supported:</td><td>%f</td></tr>" -#endif - ,LDAPG(num_links), maxl -#if HAVE_NSLDAP - ,SDKVersion/100.0,ver.protocol_version/100.0,ver.SSL_version/100.0 -#endif - ); #if HAVE_NSLDAP + + snprintf(tmp, 31, "%f", SDKVersion/100.0 ); + tmp[31]=0; + php_info_print_table_row(2, "SDK Version", tmp ); + + snprintf(tmp, 31, "%f", ver.protocol_version/100.0 ); + tmp[31]=0; + php_info_print_table_row(2, "Highest LDAP Protocol Supported", tmp ); + + snprintf(tmp, 31, "%f", ver.SSL_version/100.0 ); + tmp[31]=0; + php_info_print_table_row(2, "SSL Level Supported", tmp ); + if ( ver.security_level != LDAP_SECURITY_NONE ) { - php_printf( "<tr><td>Level of encryption:</td><td>%d bits</td></tr>\n", ver.security_level ); + snprintf(tmp, 31, "%d", ver.security_level ); + tmp[31]=0; } else { - php_printf( "<tr><td>SSL not enabled.</td><td></td></tr>\n" ); + strcpy(tmp, "SSL not enabled" ); } + php_info_print_table_row(2, "Level of Encryption", tmp ); + #endif - php_printf("</table>\n"); + + php_info_print_table_end(); } |
