Commit dc12fb9fe3ac920f5a9ebecbd9dbe0c60058d86f

Authored by Paul Barrett
2 parents 638cb4dc da9164fe

Merge branch 'edge' of github.com:ktgit/knowledgetree into edge

plugins/multiselect/BulkImport.php
... ... @@ -318,8 +318,13 @@ class InetBulkImportFolderMultiSelectAction extends KTFolderAction {
318 318 $val = KTUtil::arrayGet($values, 'metadata_' . $oField->getId());
319 319  
320 320 //Fix for multiselect not submitting data due to the value not being flat.
  321 + $sVal = '';
321 322 if (is_array($val)) {
322   - $val = $val[0];
  323 + foreach ($val as $v) {
  324 + $sVal .= $v . ", ";
  325 + }
  326 + $sVal = substr($sVal, 0, strlen($sVal) - 2);
  327 + $val = $sVal;
323 328 }
324 329  
325 330 if ($oFieldset->getIsConditional())
... ...
plugins/multiselect/BulkUpload.php
... ... @@ -332,9 +332,14 @@ class InetBulkUploadFolderAction extends KTFolderAction {
332 332 //var_dump($oField->getId());
333 333 $val = KTUtil::arrayGet($values, 'metadata_' . $oField->getId());
334 334  
335   - //Fix for multiselect not submitting data due to the value being an array.
  335 + //Fix for multiselect not submitting data due to the value not being flat.
  336 + $sVal = '';
336 337 if (is_array($val)) {
337   - $val = $val[0];
  338 + foreach ($val as $v) {
  339 + $sVal .= $v . ", ";
  340 + }
  341 + $sVal = substr($sVal, 0, strlen($sVal) - 2);
  342 + $val = $sVal;
338 343 }
339 344  
340 345 if ($oFieldset->getIsConditional())
... ...