Ask Your Question
2

Can't moderate more than 16 bits of karma?

asked 2010-09-22 18:02:05 -0500

rfrankel gravatar image

I tried giving myself a million karma and got a warning - adding the actual karma worked, but the moderation record complained; the repute object got stored with 32767 for positive and 1000001 for karma.

Does this mean the model field should be changed (assuming you agree this is a bug)?

edit retag flag offensive close merge delete

Comments

I agree that it is a bug, but it's probably better to add error checking rather than allowing more bits for an instance of reputation change b/c it will be a waste of space. There is a repute for each vote and storage for them does add up.
Evgeny gravatar imageEvgeny ( 2010-09-22 19:58:52 -0500 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2010-09-22 18:42:39 -0500

Evgeny gravatar image

updated 2010-09-22 20:00:19 -0500

Repute model uses SmallInteger field which in MySQL is in range –32768 to 32767. The user reputation is UnsignedInteger with a much larger range and apparently there is no check on the limits in the code, I've saved this issue in the bug tracker. Thanks.

edit: btw bug tracker is at http://bugs.askbot.org

edit flag offensive delete link more

Comments

Got it - I'll make sure to put (potential) bugs there and restrict this to things like installation and documentation issues. Thanks again for the help.
rfrankel gravatar imagerfrankel ( 2010-09-23 01:22:12 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2010-09-22 18:02:05 -0500

Seen: 121 times

Last updated: Sep 22 '10