Show More
@@ -73,12 +73,6 b' class PostManager(models.Manager):' | |||||
73 | last_edit_time=posting_time) |
|
73 | last_edit_time=posting_time) | |
74 | new_thread = True |
|
74 | new_thread = True | |
75 | else: |
|
75 | else: | |
76 | thread.bump() |
|
|||
77 | thread.last_edit_time = posting_time |
|
|||
78 | if thread.can_bump() and ( |
|
|||
79 | thread.get_reply_count() >= settings.MAX_POSTS_PER_THREAD): |
|
|||
80 | thread.bumpable = False |
|
|||
81 | thread.save() |
|
|||
82 | new_thread = False |
|
76 | new_thread = False | |
83 |
|
77 | |||
84 | pre_text = self._preparse_text(text) |
|
78 | pre_text = self._preparse_text(text) | |
@@ -108,6 +102,11 b' class PostManager(models.Manager):' | |||||
108 |
|
102 | |||
109 | if new_thread: |
|
103 | if new_thread: | |
110 | Thread.objects.process_oldest_threads() |
|
104 | Thread.objects.process_oldest_threads() | |
|
105 | else: | |||
|
106 | thread.bump() | |||
|
107 | thread.last_edit_time = posting_time | |||
|
108 | thread.save() | |||
|
109 | ||||
111 | self.connect_replies(post) |
|
110 | self.connect_replies(post) | |
112 |
|
111 | |||
113 | return post |
|
112 | return post |
@@ -72,6 +72,9 b' class Thread(models.Model):' | |||||
72 | if self.can_bump(): |
|
72 | if self.can_bump(): | |
73 | self.bump_time = timezone.now() |
|
73 | self.bump_time = timezone.now() | |
74 |
|
74 | |||
|
75 | if self.get_reply_count() >= settings.MAX_POSTS_PER_THREAD: | |||
|
76 | self.bumpable = False | |||
|
77 | ||||
75 | logger.info('Bumped thread %d' % self.id) |
|
78 | logger.info('Bumped thread %d' % self.id) | |
76 |
|
79 | |||
77 | def get_reply_count(self): |
|
80 | def get_reply_count(self): |
General Comments 0
You need to be logged in to leave comments.
Login now