From: Paul R. <pri...@us...> - 2007-07-21 13:38:35
|
Update of /cvsroot/mantisbt/mantisbt/core In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18661/core Modified Files: constant_inc.php ldap_api.php Log Message: Fix: 0007733: when using LDAP auth blank page upon login if LDAP extension not loaded Index: ldap_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/ldap_api.php,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- ldap_api.php 22 Apr 2006 01:52:14 -0000 1.19 +++ ldap_api.php 21 Jul 2007 13:38:26 -0000 1.20 @@ -19,6 +19,10 @@ $t_ldap_server = config_get( 'ldap_server' ); $t_ldap_port = config_get( 'ldap_port' ); + if (!extension_loaded('ldap')) { + trigger_error(ERROR_LDAP_EXTENSION_NOT_LOADED,ERROR); + } + $t_ds = @ldap_connect ( $t_ldap_server, $t_ldap_port ); if ( $t_ds > 0 ) { $t_protocol_version = config_get( 'ldap_protocol_version' ); Index: constant_inc.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/constant_inc.php,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- constant_inc.php 11 Jul 2007 03:18:13 -0000 1.67 +++ constant_inc.php 21 Jul 2007 13:38:26 -0000 1.68 @@ -256,7 +256,8 @@ define( 'ERROR_LDAP_SERVER_CONNECT_FAILED', 1401 ); define( 'ERROR_LDAP_UPDATE_FAILED', 1402 ); define( 'ERROR_LDAP_USER_NOT_FOUND', 1403 ); - + define( 'ERROR_LDAP_EXTENSION_NOT_LOADED', 1404 ); + # ERROR_CATEGORY_* define( 'ERROR_CATEGORY_DUPLICATE', 1500 ); define( 'ERROR_CATEGORY_NO_ACTION', 1501 ); |