Show More
@@ -123,7 +123,7 b' class PostManager(models.Manager):' | |||
|
123 | 123 | archive the old ones. |
|
124 | 124 | """ |
|
125 | 125 | |
|
126 | threads = Thread.objects.filter(archived=False) | |
|
126 | threads = Thread.objects.filter(archived=False).order_by('-bump_time') | |
|
127 | 127 | thread_count = threads.count() |
|
128 | 128 | |
|
129 | 129 | if thread_count > settings.MAX_THREAD_COUNT: |
@@ -56,9 +56,10 b' class Tag(models.Model):' | |||
|
56 | 56 | modifier = ARCHIVE_POPULARITY_MODIFIER |
|
57 | 57 | else: |
|
58 | 58 | modifier = 1 |
|
59 | tag_reply_count += thread.get_reply_count() * modifier | |
|
59 | tag_reply_count += thread.get_reply_count() * modifier \ | |
|
60 | / thread.tags.all().count() | |
|
60 | 61 | |
|
61 |
popularity = tag_reply_count / all_post_count |
|
|
62 | popularity = tag_reply_count / all_post_count | |
|
62 | 63 | |
|
63 | 64 | return popularity |
|
64 | 65 |
General Comments 0
You need to be logged in to leave comments.
Login now