BUG 6529 fixing other minor problems in ldap syncrhonization

fixed bug in saving imported root department
fixed bug in saving an display dropdowns in authSources edit
This commit is contained in:
Fernando Ontiveros
2011-04-11 20:27:13 -04:00
parent f65e47c606
commit 1ec225281b
3 changed files with 92 additions and 77 deletions

View File

@@ -33,6 +33,11 @@ class AuthenticationSource extends BaseAuthenticationSource {
$oAuthenticationSource = AuthenticationSourcePeer::retrieveByPK($sUID);
if (!is_null($oAuthenticationSource)) {
$aFields = $oAuthenticationSource->toArray(BasePeer::TYPE_FIELDNAME);
//fixing the problem where the BaseDN has spaces. we are removing the spaces.
$baseDn = explode(',', $aFields['AUTH_SOURCE_BASE_DN']);
foreach ($baseDn as $key => $val ) $baseDn[$key] = trim($val);
$aFields['AUTH_SOURCE_BASE_DN'] = implode (',', $baseDn);
$this->fromArray($aFields, BasePeer::TYPE_FIELDNAME);
$aFields['AUTH_SOURCE_DATA'] = ($aFields['AUTH_SOURCE_DATA'] != '' ? unserialize($aFields['AUTH_SOURCE_DATA']) : array());
return $aFields;