changeset 1737:90401aaf45e9

Fix blog entries listing on a main blog page. Display only published BLOG_ENTRY itemtypes.
author Pavel Sviderski <pavel@psviderski.name>
date Fri, 24 Aug 2012 16:49:34 +0200
parents d4f76b82aa84
children 7d258c74032d
files MoinMoin/items/blog.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/items/blog.py	Thu Aug 23 14:04:41 2012 -0700
+++ b/MoinMoin/items/blog.py	Fri Aug 24 16:49:34 2012 +0200
@@ -19,7 +19,7 @@
 from MoinMoin.themes import render_template
 from MoinMoin.forms import OptionalText, Tags, DateTime
 from MoinMoin.storage.middleware.protecting import AccessDenied
-from MoinMoin.constants.keys import NAME, NAME_EXACT, WIKINAME, PTIME, TAGS
+from MoinMoin.constants.keys import NAME, NAME_EXACT, WIKINAME, ITEMTYPE, PTIME, TAGS
 from MoinMoin.items import Item, Default, register, BaseMetaForm
 
 
@@ -56,6 +56,8 @@
         prefix = self.name + u'/'
         current_timestamp = int(time.time())
         terms = [Term(WIKINAME, app.cfg.interwikiname),
+                 # Only blog entry itemtypes
+                 Term(ITEMTYPE, ITEMTYPE_BLOG_ENTRY),
                  # Only sub items of this item
                  Prefix(NAME_EXACT, prefix),
                  # Filter out those items that do not have a PTIME meta or PTIME is in the future.