Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug #10994: fixing a regression about rating plugin. #1010

Merged
merged 1 commit into from
Oct 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ public ListSlice(int sliceBeginIndex, int sliceEndIndex) {
* If the index of the last item in the original list is lesser than the specified index, then
* this slice ends up at the index of this last item.
* @param originalListSize the size of the original list this slice comes from. It must be greater
* than 0.
* or equal to 0.
*/
public ListSlice(int sliceBeginIndex, int sliceEndIndex, long originalListSize) {
this(sliceBeginIndex, sliceEndIndex);
if (originalListSize <= 0) {
if (originalListSize < 0) {
throw new AssertionError();
}
this.maxsize = originalListSize;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
var label_RatingVoteDelete = $labels.attr('label_RatingVoteDelete');
var label_RatingVoteYours = $labels.attr('label_RatingVoteYours');
var label_RatingVoteNone = $labels.attr('label_RatingVoteNone');
var param_userAnonymous = Number($labels.attr('param_userAnonymous'));
var param_userAnonymous = 'true' === $labels.attr('param_userAnonymous');

/*
Treatments
Expand All @@ -80,7 +80,7 @@
if (scope.raterrating) {
scope.raterrating = Rating.wrap(scope.raterrating);
} else {
scope.raterrating = Rating.wrap(Number(attrs.raterrating));
scope.raterrating = Rating.wrap(window[attrs.raterrating]);
}
scope.contributionid = scope.raterrating.contributionId;
scope.contributiontype = scope.raterrating.contributionType;
Expand Down