r39510 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39509‎ | r39510 | r39511 >
Date:22:49, 16 August 2008
Author:laner
Status:old
Tags:
Comment:
* Added better check for LDAP support
** Plugin will not continue if LDAP support is unavailable, avoiding the white screen of death
Modified paths:
  • /trunk/extensions/LdapAuthentication/LdapAuthentication.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LdapAuthentication/LdapAuthentication.php
@@ -140,8 +140,9 @@
141141
142142 $this->printDebug( "Entering Connect", NONSENSITIVE );
143143
144 - if ( !extension_loaded( 'ldap' ) ) {
 144+ if ( !function_exists( 'ldap_connect' ) ) {
145145 $this->printDebug( "It looks like you are issing LDAP support; please ensure you have either compiled LDAP support in, or have enabled the module. If the authentication is working for you, the plugin isn't properly detecting the LDAP module, and you can safely ignore this message.", NONSENSITIVE );
 146+ return false;
146147 }
147148
148149 //If the admin didn't set an encryption type, we default to tls

Status & tagging log