Commit 1466ed9061c90f1d1dd40da319c15a11de111fdf

Authored by Neil Blakey-Milner
1 parent 1ca1a335

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);
... ...