Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MilderJoghurt
rlf-server
Commits
10c75681
Commit
10c75681
authored
Jul 13, 2015
by
FDeppe
Browse files
changed server code to consider vote values of break-requests instead of just counting them
parent
b614bcec
Changes
1
Show whitespace changes
Inline
Side-by-side
app/controllers/VoteController.java
View file @
10c75681
...
...
@@ -146,7 +146,7 @@ public class VoteController extends Controller {
case
BREAK:
// consider only last 10min
if
(
v
.
date
.
after
(
tenMinutesAgo
))
{
sBreakRequests
.
value
++
;
sBreakRequests
+=
v
.
value
;
}
break
;
default
:
...
...
@@ -159,6 +159,9 @@ public class VoteController extends Controller {
}
}
// prevent invalid counting due to flow of time and consideration-time-interval of votes
sBreakRequests
=
Math
.
max
(
0
,
sBreakRequests
);
// generate statistics
sUsers
.
value
=
usersAll
.
size
();
if
(
usersSpeed
.
size
()
>
0
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment