summaryrefslogtreecommitdiff
path: root/src/lq/ImportQuotes.java
diff options
context:
space:
mode:
authorKjetil Ørbekk <orbekk@pvv.ntnu.no>2010-09-04 02:03:44 -0400
committerKjetil Ørbekk <orbekk@pvv.ntnu.no>2010-09-04 02:03:44 -0400
commitec11abe2f142c45240fe9ff172aa13a2e089019f (patch)
treed4abb611a57beb433bb83beaf68a295c0238b82d /src/lq/ImportQuotes.java
parentb504b5fe05410bc259cd4349d1b51dc355eb0d90 (diff)
Add scorePoints to Quotes.
ScorePoints is used to order by score on the quote site. See Quote for the formula.
Diffstat (limited to 'src/lq/ImportQuotes.java')
-rw-r--r--src/lq/ImportQuotes.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lq/ImportQuotes.java b/src/lq/ImportQuotes.java
index d750b7b..634521c 100644
--- a/src/lq/ImportQuotes.java
+++ b/src/lq/ImportQuotes.java
@@ -150,8 +150,7 @@ public class ImportQuotes extends HttpServlet {
Vote vote = new Vote(quoteId, rating, ip);
vote.setTimestamp(timestamp);
- quote.setSumVotes(quote.getSumVotes() + rating);
- quote.setNumVotes(quote.getNumVotes() + 1);
+ QuoteUtil.addVote(quote, vote);
return vote;
}