From 604e6ba8d7289343fe352287b8ec09a051df195c Mon Sep 17 00:00:00 2001 From: Arno Kaimbacher Date: Tue, 8 Jun 2021 11:39:23 +0200 Subject: [PATCH] - doi creation: change landingPageUrl for doi subdomain and also call touch for dataset update event (solr) --- app/Http/Controllers/Publish/EditorController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Publish/EditorController.php b/app/Http/Controllers/Publish/EditorController.php index 973bbab..6d39f97 100644 --- a/app/Http/Controllers/Publish/EditorController.php +++ b/app/Http/Controllers/Publish/EditorController.php @@ -703,7 +703,8 @@ class EditorController extends Controller //create doiValue and correspunfing landingpage of tehtys $doiValue = $prefix . '/tethys.' . $dataset->publish_id; // $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); // if operation successful, store dataste identifier if ($response->getStatusCode() == 201) { @@ -713,6 +714,8 @@ class EditorController extends Controller $doi['type'] = "doi"; $doi['status'] = "findable"; if ($doi->save()) { + // touch doi (and dataset) for solr + $doi->touch(); // update server_date_modified for triggering nex xml cache (doi interface) // $time = new \Illuminate\Support\Carbon(); // $dataset->server_date_modified = $time;