diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2011-02-14 22:44:42 -0500 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2011-02-14 22:44:42 -0500 |
commit | f4dceaa6cf277bb09c8c2e7b995e492b2c052c8c (patch) | |
tree | 40ff5498d9aa97c81a89c83e8da5ef6ce781a683 /askbot/auth.py | |
parent | 8c1f61bcd212363720f11a65e4e43bc96a9987f7 (diff) | |
download | askbot-f4dceaa6cf277bb09c8c2e7b995e492b2c052c8c.tar.gz askbot-f4dceaa6cf277bb09c8c2e7b995e492b2c052c8c.tar.bz2 askbot-f4dceaa6cf277bb09c8c2e7b995e492b2c052c8c.zip |
finished the anonymous posting feature on the first pass
Diffstat (limited to 'askbot/auth.py')
-rw-r--r-- | askbot/auth.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/askbot/auth.py b/askbot/auth.py index 6b12f08d..118810ca 100644 --- a/askbot/auth.py +++ b/askbot/auth.py @@ -167,7 +167,7 @@ def onUpVoted(vote, post, user, timestamp=None): post.score = int(post.score) + 1 post.save() - if not post.wiki: + if not (post.wiki or post.is_anonymous): author = post.author todays_rep_gain = Repute.objects.get_reputation_by_upvoted_today(author) if todays_rep_gain < askbot_settings.MAX_REP_GAIN_PER_USER_PER_DAY: @@ -200,7 +200,7 @@ def onUpVotedCanceled(vote, post, user, timestamp=None): post.score = int(post.score) - 1 post.save() - if not post.wiki: + if not (post.wiki or post.is_anonymous): author = post.author author.receive_reputation( askbot_settings.REP_LOSS_FOR_RECEIVING_UPVOTE_CANCELATION @@ -231,7 +231,7 @@ def onDownVoted(vote, post, user, timestamp=None): post.score = int(post.score) - 1 post.save() - if not post.wiki: + if not (post.wiki or post.is_anonymous): author = post.author author.receive_reputation(askbot_settings.REP_LOSS_FOR_DOWNVOTING) author.save() @@ -273,7 +273,7 @@ def onDownVotedCanceled(vote, post, user, timestamp=None): post.score = post.score + 1 post.save() - if not post.wiki: + if not (post.wiki or post.is_anonymous): author = post.author author.receive_reputation( askbot_settings.REP_GAIN_FOR_RECEIVING_DOWNVOTE_CANCELATION |