add a top karma givers report
This commit is contained in:
parent
47bb4bac49
commit
2cc79b42a6
@ -160,6 +160,9 @@ class Karma(Module):
|
|||||||
elif (report == 'negative'):
|
elif (report == 'negative'):
|
||||||
query = 'SELECT who, neg FROM karma_users ORDER BY neg DESC LIMIT 5'
|
query = 'SELECT who, neg FROM karma_users ORDER BY neg DESC LIMIT 5'
|
||||||
header = 'Top 5 Pessimists:'
|
header = 'Top 5 Pessimists:'
|
||||||
|
elif (report == 'top'):
|
||||||
|
query = 'SELECT who, pos+neg AS total FROM karma_users ORDER BY total DESC LIMIT 5'
|
||||||
|
header = 'Top 5 Total Karma Givers:'
|
||||||
|
|
||||||
if (query != None):
|
if (query != None):
|
||||||
conn = self.get_db()
|
conn = self.get_db()
|
||||||
|
Loading…
Reference in New Issue
Block a user