Bug in category_entry_items in 1.2.4 and earlier

"Rich Trott" <[email protected]> Wed, 15 Feb 2006 17:45:18 -0800
Newsgroups gmane.comp.python.zope.coreblog.english
Message-ID <[email protected]>
There appears to be a bug in 1.2.4 in COREblog.py in category_entry_items.
It does not return the very last item that it should return.  By comparing
to rev_category_entry_items, which does not have this bug, I was able to
determine the two lines of code that needed to be added to fix the bug.
Here's what it should look like, I believe:

 

    security.declareProtected(View, 'category_entry_items')

    def
category_entry_items(self,category_id,start=0,count=-1,consider_moderation =
1):

        """Return list of Entry."""

        try:

            int_cat = int(category_id)

        except:

            return []

        l = self.get_entry_in_category(int_cat,consider_moderation)

        l.reverse()

        if count == -1:

            count = len(self.entry_list)

        return l[start:start+count]

 

 

The new lines are the "if count." and the "count = len." lines.

 

I see the trac set up for COREblog2, but is there a bug report system for
1.2.4?

 

Rich

_______________________________________________
COREblog-en mailing list
COREblog-en-/9qXvnWia/9Wk0Htik3J/[email protected]
http://postaria.com/cgi-bin/mailman/listinfo/coreblog-en
Unsubscription writing to coreblog-en-leave-/9qXvnWia/9Wk0Htik3J/[email protected]