You are here

function _agls_fix_tags_7002 in AGLS Metadata 7

Fix naming of the tags for update 7002.

1 string reference to '_agls_fix_tags_7002'
agls_update_7002 in ./agls.install
Replace AGLSTERMS.isBasisFor and AGLSTERMS.isBasedOn with dcterms.

File

./agls.install, line 186
Update scripts for the AGLS module.

Code

function _agls_fix_tags_7002($record) {
  if (!empty($record->data)) {
    foreach ($record->data as $tag_name => $tag_data) {

      // Fix 'isBasisFor'.
      if ($tag_name == 'AGLSTERMS.isBasisFor') {
        unset($record->data[$tag_name]);
        $record->data['dcterms.isBasisFor'] = $tag_data;
      }

      // Fix 'isBasisFor'.
      if ($tag_name == 'AGLSTERMS.isBasedOn') {
        unset($record->data[$tag_name]);
        $record->data['dcterms.isBasedOn'] = $tag_data;
      }
    }
  }
  return $record;
}