Skip to content

Commit

Permalink
Merge pull request #11 from wfyson/eps-update
Browse files Browse the repository at this point in the history
Fix bug where license was not being set on the document.
  • Loading branch information
adam-rehin authored Aug 7, 2019
2 parents 526565e + 37bcba0 commit 9d2cce5
Show file tree
Hide file tree
Showing 3 changed files with 177 additions and 183 deletions.
14 changes: 5 additions & 9 deletions lib/plugins/EPrints/Plugin/Import/PubRouter.pm
Original file line number Diff line number Diff line change
Expand Up @@ -433,22 +433,18 @@ sub xml_to_epdata
if( $license && $dataset->has_field( "rioxx2_license_ref_input" ) )
{
my $license_url = $plugin->xml_to_text( $license );

my $start_date = $license->getAttribute( "start_date" );
$epdata->{rioxx2_license_ref_input} = {
license_ref => $license_url,
start_date => $start_date,
};

if( exists $license_urls{$license_url} )
my $stripped_lic_url = $license_url;
$stripped_lic_url =~ s/^https?:\/\///i; # Remove 'http://' or 'https://' prefix
if( exists $license_urls{$stripped_lic_url } )
{
my $stripped_lic_url = $license_url;
$stripped_lic_url =~ s/^https?:\/\///i; # Remove 'http://' or 'https://' prefix
if( exists $license_urls{$stripped_lic_url } )
{
$docdata->{license} = $license_urls{$stripped_lic_url};
}
}
$docdata->{license} = $license_urls{$stripped_lic_url};
}
}

#embargo date
Expand Down
Loading

0 comments on commit 9d2cce5

Please # to comment.