Commit 3a1aa9436789a6870ee37db071c0e379a6f4200a

Authored by nbm
1 parent 1691d371

Clear the existing values for the behaviour before storing the current

values.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3867 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/administration/docfieldmanagement/conditional/ajaxSimpleConditionals.php
... ... @@ -67,6 +67,12 @@ class AjaxConditionalAdminDispatcher extends KTStandardDispatcher {
67 67 $sTable = KTUtil::getTableName('field_behaviour_options');
68 68 $aOptions = array('noid' => true);
69 69  
  70 + $aQuery = array(
  71 + "DELETE FROM $sTable WHERE behaviour_id = ?",
  72 + array($iBehaviourId),
  73 + );
  74 + $res = DBUtil::runQuery($aQuery);
  75 +
70 76 foreach ($child_lookups as $iFieldId => $aLookups) {
71 77 foreach ($aLookups as $iLookupId) {
72 78 $oValueInstance =& KTMetadataUtil::getOrCreateValueInstanceForLookup($iLookupId);
... ...