Remove nb_unread/nb_messages in CapMessages
Most backends don't set it nb_messages and no application used it. No backends set nb_unread and only one application tried to use it. This should help avoid useless fillobj() calls in some cases. fixes #827
This commit is contained in:
parent
79724c90f5
commit
ba5949cd22
5 changed files with 4 additions and 15 deletions
|
|
@ -72,7 +72,6 @@ class PhpBBBackend(BaseBackend, ICapMessages, ICapMessagesPost):
|
|||
thread = Thread(url2id(link.url))
|
||||
thread.title = ('%s ' % root_link.title if root_link else '') + link.title
|
||||
thread.date = link.date
|
||||
thread.nb_messages = link.nb_messages
|
||||
thread.flags = thread.IS_DISCUSSION
|
||||
yield thread
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ class Link(object):
|
|||
self.url = url
|
||||
self.title = u''
|
||||
self.date = None
|
||||
self.nb_messages = 0
|
||||
|
||||
class ForumPage(PhpBBPage):
|
||||
def iter_links(self):
|
||||
|
|
@ -63,8 +62,6 @@ class ForumPage(PhpBBPage):
|
|||
continue
|
||||
else:
|
||||
break
|
||||
# it only lists number of answers, so we add 1.
|
||||
link.nb_messages = int(li.cssselect('dd.posts')[0].text.strip()) + 1
|
||||
yield link
|
||||
|
||||
def iter_all_forums(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue