]> source.dussan.org Git - archiva.git/commitdiff
MRM-1040 - for snapshots in search results just show SNAPSHOT, not timestamps
authorJames William Dumay <jdumay@apache.org>
Tue, 16 Dec 2008 02:37:48 +0000 (02:37 +0000)
committerJames William Dumay <jdumay@apache.org>
Tue, 16 Dec 2008 02:37:48 +0000 (02:37 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@726930 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java

index c3d9194fb59a270a14b7ab0559fbe1d00a434f0f..7db42d166831cbb370c06a610466dcb66f1a799b 100644 (file)
@@ -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;
     }