Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
mah0001 committed May 30, 2024
1 parent d2f9371 commit d6abcbc
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions application/views/display_templates/fields/field_doi-citation.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<?php
if (!isset($data) || !is_array($data)){
return false;
}
<?php if (isset($data) && is_array($data) || isset($metadata['doi']) ):?>
<?php

$doi='';
foreach($data as $row){
if (isset($row['type']) && strtolower($row['type'])=='doi'){
if (isset($row['identifier'])){
$doi=$row['identifier'];
break;
if (isset($metadata['doi'])){
$doi=$metadata['doi'];
}
else{
$doi='';
foreach($data as $row){
if (isset($row['type']) && strtolower($row['type'])=='doi'){
if (isset($row['identifier'])){
$doi=$row['identifier'];
break;
}
}
}
}
Expand Down Expand Up @@ -156,3 +159,5 @@ function js_download(filename, text)
});

</script>

<?php endif;?>

0 comments on commit d6abcbc

Please sign in to comment.