From a9efd1383b739c5a3c4177ca80d02d1ef0259151 Mon Sep 17 00:00:00 2001 From: James William Dumay Date: Tue, 16 Dec 2008 02:37:48 +0000 Subject: [PATCH] MRM-1040 - for snapshots in search results just show SNAPSHOT, not timestamps git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@726930 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/maven/archiva/web/action/SearchAction.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java index c3d9194fb..7db42d166 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java @@ -208,6 +208,15 @@ public class SearchAction totalPages = totalPages + 1; } + for (SearchResultHit hit : results.getHits()) + { + final String version = hit.getVersion(); + if (version != null) + { + hit.setVersion(VersionUtil.getBaseVersion(version)); + } + } + return SUCCESS; } -- 2.39.5