From c2fb7d6462f84e58eead10c8c4d7c217e87552ac Mon Sep 17 00:00:00 2001 From: nbm Date: Wed, 26 Apr 2006 09:50:34 +0000 Subject: [PATCH] KTS-897: don't synchronise empty items over. --- examples/fieldsynchronisation/syncFieldFromLDAP.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/fieldsynchronisation/syncFieldFromLDAP.php b/examples/fieldsynchronisation/syncFieldFromLDAP.php index a14a9eb..d3d13fe 100644 --- a/examples/fieldsynchronisation/syncFieldFromLDAP.php +++ b/examples/fieldsynchronisation/syncFieldFromLDAP.php @@ -77,7 +77,11 @@ foreach ($aResults->entries() as $oEntry) { // print $oEntry->dn() . "\n"; $sValue = $oEntry->get_value($sAttribute, 'single'); // print $sValue . "\n"; - $aValues[] = $sValue; + if (!empty($sValue)) { + $aValues[] = $sValue; + } } +$aValues = array_unique($aValues); + KTMetadataUtil::synchroniseMetadata($oField, $aValues); -- libgit2 0.21.4