Re: Fixing Gnotices
- From: "Michael R. Bernstein" <webmaven lvcm com>
- To: Jonathan Blandford <jrb redhat com>
- Cc: gnome-web-list gnome org
- Subject: Re: Fixing Gnotices
- Date: 05 Sep 2001 22:35:24 -0700
On Wed, 2001-09-05 at 14:47, Jonathan Blandford wrote:
>
> "Michael R. Bernstein" <webmaven lvcm com> writes:
> >
> > Anyway, I've got a patch from him that *should* add the feature with no
> > bugs, so who has the access to apply it on the server?
>
> I can do it.
Here's the patch. I haven't heard back from Chris whether this is
supposed to be applied against version 1.2.1 of Squishdot (what Gnotices
is running on) or against a current (1.3.0) version. The patch may
actually work for either version.
Anyway, definitely backup Posting.py first, just in case.
Thanks for the help,
Michael Bernstein.
===================================================================
RCS file: /cvsroot/squishdot/Squishdot/Posting.py,v
retrieving revision 1.27
diff -r1.27 Posting.py
22c22
< from Utility import CRLF, tagRegex, Stack, doAddPosting, getitem
---
> from Utility import CRLF, tagRegex, doAddPosting, getitem
182,203c182,189
< # """ return latest list of replies """
< mlist = []
< mstack = Stack()
< if self.has_items():
< plist = []
< for id in self.ids:
< plist.append(id)
< plist.reverse()
< for id in plist:
< mstack.push(id)
< while not mstack.isEmpty():
< item_id = mstack.pop()
< item = self.data[item_id]
< mlist.append(item)
< if item.has_items():
< plist = []
< for id in item.ids:
< plist.append(id)
< plist.reverse()
< for id in plist:
< mstack.push(id)
< return map((lambda x, p=self: x.__of__(p)), mlist)
---
> # """ return latest list of replies """
> items = []
> postings = map(self.__getitem__,self.ids)
> reviewed = filter(lambda p: p.reviewed, postings)
> for item in reviewed:
> items.append(item)
> items.extend(item.desc_items())
> return items
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]