Browse Source

tag2link: when formatterURLs are duplicates, check if we can add operator name

master
parent
commit
e20b4d2ea7
  1. 12
      bin/tag2link-converter

12
bin/tag2link-converter

@ -12,9 +12,17 @@ foreach ($files as $file) {
if (array_key_exists($key, $tag2link)) { if (array_key_exists($key, $tag2link)) {
// avoid duplicates // avoid duplicates
if (sizeof(array_filter($tag2link[$key]['formatter'], function ($e) use ($link) {
$duplicates = array_filter($tag2link[$key]['formatter'], function ($e) use ($link) {
return $e['link'] === $link; return $e['link'] === $link;
}))) {
});
if (sizeof($duplicates)) {
if (array_key_exists('operatorLabel', $entry)) {
foreach ($duplicates as $i => $d) {
$tag2link[$key]['formatter'][$i]['operator'] = $entry['operatorLabel']['value'];
}
}
continue; continue;
} }
} }

Loading…
Cancel
Save