- doi creation: change landingPageUrl for doi subdomain and also call touch for dataset update event (solr)
This commit is contained in:
parent
2040a9d260
commit
604e6ba8d7
|
@ -703,7 +703,8 @@ class EditorController extends Controller
|
||||||
//create doiValue and correspunfing landingpage of tehtys
|
//create doiValue and correspunfing landingpage of tehtys
|
||||||
$doiValue = $prefix . '/tethys.' . $dataset->publish_id;
|
$doiValue = $prefix . '/tethys.' . $dataset->publish_id;
|
||||||
// $appUrl = config('app.url');
|
// $appUrl = config('app.url');
|
||||||
$landingPageUrl = $base_domain . "/dataset/" . $dataset->publish_id;
|
// $landingPageUrl = $base_domain . "/dataset/" . $dataset->publish_id;
|
||||||
|
$landingPageUrl = 'https://doi.' . get_domain($base_domain) . "/" . $prefix . "/tethys." . $dataset->publish_id;
|
||||||
$response = $this->doiClient->registerDoi($doiValue, $xmlMeta, $landingPageUrl);
|
$response = $this->doiClient->registerDoi($doiValue, $xmlMeta, $landingPageUrl);
|
||||||
// if operation successful, store dataste identifier
|
// if operation successful, store dataste identifier
|
||||||
if ($response->getStatusCode() == 201) {
|
if ($response->getStatusCode() == 201) {
|
||||||
|
@ -713,6 +714,8 @@ class EditorController extends Controller
|
||||||
$doi['type'] = "doi";
|
$doi['type'] = "doi";
|
||||||
$doi['status'] = "findable";
|
$doi['status'] = "findable";
|
||||||
if ($doi->save()) {
|
if ($doi->save()) {
|
||||||
|
// touch doi (and dataset) for solr
|
||||||
|
$doi->touch();
|
||||||
// update server_date_modified for triggering nex xml cache (doi interface)
|
// update server_date_modified for triggering nex xml cache (doi interface)
|
||||||
// $time = new \Illuminate\Support\Carbon();
|
// $time = new \Illuminate\Support\Carbon();
|
||||||
// $dataset->server_date_modified = $time;
|
// $dataset->server_date_modified = $time;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user