Skip to content

Commit

Permalink
check citation doi if empty (wikidata), skip if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
GaziYucel committed Apr 30, 2024
1 parent 820da92 commit 6d0f537
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions classes/External/Wikidata/Inbound.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,11 @@ public function execute(): bool
/* @var CitationModel $citation */
$citation = ClassHelper::getClassWithValuesAssigned(new CitationModel(), $citations[$i]);

if (!empty($citation->wikidataId)) continue;
if (!empty($citation->wikidataId) || empty($citation->doi)) continue;

if(!empty($citation->doi)){
$citation = $this->processCitation($citation);
$citation->wikidataId = Wikidata::removePrefix($citation->wikidataId);
}
$citation = $this->processCitation($citation);

$citation->wikidataId = Wikidata::removePrefix($citation->wikidataId);

$citations[$i] = $citation;
}
Expand Down

0 comments on commit 6d0f537

Please sign in to comment.