From: Michael M Slusarz Date: Thu, 27 May 2010 16:56:48 +0000 (-0600) Subject: Bug #9060: Global LDAP configuration can be empty X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=6d91d57895d4abefa9ee6b0ce385be3720502648;p=horde.git Bug #9060: Global LDAP configuration can be empty --- diff --git a/framework/Core/lib/Horde/Config.php b/framework/Core/lib/Horde/Config.php index 4cb897320..32131a9d3 100644 --- a/framework/Core/lib/Horde/Config.php +++ b/framework/Core/lib/Horde/Config.php @@ -619,12 +619,12 @@ class Horde_Config * Custom configuration parts. * * @param string $ctx The context of the tag. - * @param DomNode $node The DomNode representation of the - * tag. + * @param DomNode $node The DomNode representation of the + * tag. * @param string $switchname If DomNode is not set, the value of the * tag's switchname attribute. * - * @return array An associative array with the SQL configuration tree. + * @return array An associative array with the LDAP configuration tree. */ protected function _configLDAP($ctx, $node = null, $switchname = 'driverconfig') @@ -728,15 +728,29 @@ class Horde_Config ); $custom_fields = array( - 'hostspec' => $hostspec, - 'port' => $port, - 'version' => $version, - 'tls' => $tls, - 'searchdn' => $searchdn, - 'searchpw' => $searchpw, - 'basedn' => $basedn, - 'writedn' => $writedn, - 'ca' => $ca + 'required' => true, + 'desc' => 'Use a LDAP backend?', + 'default' => $this->_default($ctx . '|useldap', 'false'), + 'switch' => array( + 'false' => array( + 'desc' => 'No', + 'fields' => array() + ), + 'true' => array( + 'desc' => 'Yes', + 'fields' => array( + 'hostspec' => $hostspec, + 'port' => $port, + 'version' => $version, + 'tls' => $tls, + 'searchdn' => $searchdn, + 'searchpw' => $searchpw, + 'basedn' => $basedn, + 'writedn' => $writedn, + 'ca' => $ca + ) + ) + ) ); if (isset($node) && $node->getAttribute('baseconfig') == 'true') { diff --git a/horde/config/conf.xml b/horde/config/conf.xml index c71240eea..dd4b5b373 100644 --- a/horde/config/conf.xml +++ b/horde/config/conf.xml @@ -150,7 +150,7 @@ <em>default</em> values for any LDAP driven backends. You still need to configure the different systems like "Preferences" to actually <em>use</em> a LDAP backend. - +