Freetext import tool now prunes duplicate values, fixes #517

pull/541/head
Iglocska 2015-06-04 11:04:34 +02:00
parent 0ca832887c
commit 4caf9b2d81
1 changed files with 7 additions and 0 deletions

View File

@ -2870,6 +2870,13 @@ class EventsController extends AppController {
}
$r['types'] = $temp;
}
// remove all duplicates
foreach ($resultArray as $k => $v) {
for ($i = 0; $i < $k; $i++) {
if (isset($resultArray[$i]) && $v == $resultArray[$i]) unset ($resultArray[$k]);
}
}
$typeCategoryMapping = array();
foreach ($this->Event->Attribute->categoryDefinitions as $k => $cat) {
foreach ($cat['types'] as $type) {