From 6c9d6a863f0db5fa9da5bb841a8bc3024bd11f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjetil=20=C3=98rbekk?= Date: Sat, 4 Sep 2010 11:17:30 -0400 Subject: Print header in ViewQuote --- src/lq/Quote.java | 2 +- src/lq/ViewQuote.java | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/lq/Quote.java b/src/lq/Quote.java index 9d399fb..237f002 100644 --- a/src/lq/Quote.java +++ b/src/lq/Quote.java @@ -40,8 +40,8 @@ public class Quote { @Persistent private Integer numVotes; + // sum [ (rating-2.5) * abs(rating-2.5) | rating <- votes ] @Persistent - // sum [ (rating-3) * abs((rating-3)) | rating <- votes ] private Double scorePoints; public Quote(Date quoteDate, String author, String content, String ip) { diff --git a/src/lq/ViewQuote.java b/src/lq/ViewQuote.java index 2575523..5c40ac3 100644 --- a/src/lq/ViewQuote.java +++ b/src/lq/ViewQuote.java @@ -20,6 +20,8 @@ public class ViewQuote extends HttpServlet { Quote quote = QuoteUtil.getQuoteWithId(id); resp.setContentType("text/html"); + resp.getWriter().println(header); + resp.getWriter().println("

"); if (quote != null) { Printer printer = new Printer(resp.getWriter()); @@ -29,4 +31,21 @@ public class ViewQuote extends HttpServlet { resp.getWriter().println("Quote not found."); } } + + private final String header = + " " + + " " + + " " + + "Quotes fra #linux.no på freenode " + + " " + + " " + + " "; + } -- cgit v1.2.3