changeset 2574:7dd5eab0f701

make generated IDs nicer, qualify iff necessary
author Johannes Berg <johannes AT sipsolutions DOT net>
date Fri, 27 Jul 2007 11:37:01 +0200
parents fd896a933d58
children d1ec881c6f86
files MoinMoin/request/__init__.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/request/__init__.py	Thu Jul 26 17:34:54 2007 +0200
+++ b/MoinMoin/request/__init__.py	Fri Jul 27 11:37:01 2007 +0200
@@ -1444,7 +1444,9 @@
             pids[namespace] = self._page_ids[namespace].copy()
         self._include_stack.append((self.include_id, pids))
         self.include_id = self.make_unique_id(base)
-        if self.include_id == base:
+        # if it's the page name then set it to None so we don't
+        # prepend anything to IDs, but otherwise keep it.
+        if self.page and self.page.page_name == self.include_id:
             self.include_id = None
 
     def end_include(self):