changeset 3814:26240254340b

avoid creating of new pagedirs with empty edit-log files by just accessing a non-existant page
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 02 Jul 2008 14:47:41 +0200
parents a3cf0aa7bf97
children dcd932f8c4ec
files MoinMoin/theme/__init__.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/theme/__init__.py	Mon Jun 30 19:44:55 2008 +0000
+++ b/MoinMoin/theme/__init__.py	Wed Jul 02 14:47:41 2008 +0200
@@ -1719,6 +1719,7 @@
 
         # In standard mode, emit theme.header
         else:
+            exists = pagename and page.exists(includeDeleted=True)
             # prepare dict for theme code:
             d = {
                 'theme': self.name,
@@ -1729,7 +1730,8 @@
                 'page': page,
                 'rev': rev,
                 'pagesize': pagename and page.size() or 0,
-                'last_edit_info': pagename and page.lastEditInfo() or '',
+                # exists checked to avoid creation of empty edit-log for non-existing pages
+                'last_edit_info': exists and page.lastEditInfo() or '',
                 'page_name': pagename or '',
                 'page_find_page': page_find_page,
                 'page_front_page': page_front_page,