mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Merge pull request #11160 from JohnnyMendesC/fix/8852-oai-statistics-prefix
fix(#8852): Statistics event processor now uses oaiPrefix instead of getHost
This commit is contained in:
@@ -137,9 +137,10 @@ public abstract class ExportEventProcessor {
|
||||
.append(URLEncoder.encode(clientUA, UTF_8));
|
||||
|
||||
String hostName = Utils.getHostName(configurationService.getProperty("dspace.ui.url"));
|
||||
String oaiPrefix = configurationService.getProperty("oai.identifier.prefix");
|
||||
|
||||
data.append("&").append(URLEncoder.encode("rft.artnum", UTF_8)).append("=").
|
||||
append(URLEncoder.encode("oai:" + hostName + ":" + item
|
||||
append(URLEncoder.encode("oai:" + oaiPrefix + ":" + item
|
||||
.getHandle(), UTF_8));
|
||||
data.append("&").append(URLEncoder.encode("rfr_dat", UTF_8)).append("=")
|
||||
.append(URLEncoder.encode(referer, UTF_8));
|
||||
|
@@ -116,6 +116,7 @@ public class ITIrusExportUsageEventListener extends AbstractIntegrationTestWithD
|
||||
configurationService.setProperty("irus.statistics.tracker.enabled", true);
|
||||
configurationService.setProperty("irus.statistics.tracker.type-field", "dc.type");
|
||||
configurationService.setProperty("irus.statistics.tracker.type-value", "Excluded type");
|
||||
configurationService.setProperty("oai.identifier.prefix", "localhost");
|
||||
|
||||
|
||||
context.turnOffAuthorisationSystem();
|
||||
|
@@ -62,6 +62,7 @@ public class ExportEventProcessorIT extends AbstractIntegrationTestWithDatabase
|
||||
configurationService.setProperty("irus.statistics.tracker.enabled", true);
|
||||
configurationService.setProperty("irus.statistics.tracker.type-field", "dc.type");
|
||||
configurationService.setProperty("irus.statistics.tracker.type-value", "Excluded type");
|
||||
configurationService.setProperty("oai.identifier.prefix", "localhost");
|
||||
|
||||
context.turnOffAuthorisationSystem();
|
||||
publication = EntityTypeBuilder.createEntityTypeBuilder(context, "Publication").build();
|
||||
|
Reference in New Issue
Block a user