Don’t always create a Sone for a given ID.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 19 Nov 2010 20:53:49 +0000 (21:53 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 19 Nov 2010 20:53:49 +0000 (21:53 +0100)
src/main/java/net/pterodactylus/sone/web/ViewSonePage.java
src/main/resources/i18n/sone.en.properties
src/main/resources/templates/viewSone.html

index 1ff248d..8b88f2e 100644 (file)
@@ -50,7 +50,7 @@ public class ViewSonePage extends SoneTemplatePage {
        protected void processTemplate(Request request, Template template) throws RedirectException {
                super.processTemplate(request, template);
                String soneId = request.getHttpRequest().getParam("sone");
-               Sone sone = webInterface.getCore().getSone(soneId);
+               Sone sone = webInterface.getCore().getSone(soneId, false);
                template.set("sone", sone);
        }
 
index 0dd21d0..0db2276 100644 (file)
@@ -87,6 +87,7 @@ Page.CreateReply.Button.Post=Post Reply!
 
 Page.ViewSone.Title=View Sone - Sone
 Page.ViewSone.Page.TitleWithoutSone=View unknown Sone
+Page.ViewSone.NoSone.Description=There is currently no known Sone with the ID {sone}. If you were looking for a specific Sone, make sure that it is visible in your web of trust!
 Page.ViewSone.UnknownSone.Description=This Sone has not yet been retrieved. Please check back in a short time.
 Page.ViewSone.PostList.Title=Posts by {sone}
 Page.ViewSone.PostList.Text.NoPostYet=This Sone has not yet posted anything.
index fcb2891..534c5ff 100644 (file)
@@ -1,6 +1,12 @@
 <%include include/head.html>
 
-       <%ifnull sone.name>
+       <%ifnull sone>
+
+               <h1><%= Page.ViewSone.Page.TitleWithoutSone|l10n|html></h1>
+
+               <p><%= Page.ViewSone.NoSone.Description|l10n|insert needle="{sone}" key=sone.id|html></p>
+
+       <%elseifnull sone.name>
 
                <h1><%= Page.ViewSone.Page.TitleWithoutSone|l10n|html></h1>