changeset 882:e2c03a3c79d6

Allow the NewPage macro to add pages below the user's home page. Thanks to Reimar Bauer.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Thu, 06 Jul 2006 16:42:41 +0200
parents 21095ba16b58
children a170df39355f
files MoinMoin/macro/NewPage.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/NewPage.py	Tue Jul 04 10:31:25 2006 +0200
+++ b/MoinMoin/macro/NewPage.py	Thu Jul 06 16:42:41 2006 +0200
@@ -9,6 +9,7 @@
     @copyright: 2004 Vito Miliano (vito_moinnewpagewithtemplate@perilith.com)
     @copyright: 2004 by Nir Soffer <nirs@freeshell.org>
     @copyright: 2004 Alexander Schremmer <alex AT alexanderweb DOT de>
+    @copyright: 2006 MoinMoin:ReimarBauer
     @license: GNU GPL, see COPYING for details.
 """
 
@@ -75,6 +76,9 @@
         label = self.args.get('buttonLabel')
         nametemplate = self.args.get('nameTemplate') or u'%s'
         
+        if parent == '@ME' and self.request.user.valid:
+            parent = self.request.user.name
+        
         requires_input = nametemplate.find('%s') != -1
         
         if label: