changeset 5826:efbed3479795

fix globaledit script to keep comments on Homepage...Template pages
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 04 Feb 2012 14:34:20 +0100
parents d398cf41ac3b
children 42be7f8e62a5
files MoinMoin/script/maint/globaledit.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/script/maint/globaledit.py	Tue Jan 24 22:36:32 2012 +0100
+++ b/MoinMoin/script/maint/globaledit.py	Sat Feb 04 14:34:20 2012 +0100
@@ -99,7 +99,11 @@
             content_lines.append('')
 
         if masterpage and masterpage.endswith('Template'):
-            changedtext = master_lines + [format_line, language_line, ] + pragma_lines + content_lines
+            if masterpage.startswith('Homepage'):
+                # keep the comments on the Homepage...Template, but after the master lines:
+                changedtext = master_lines + comment_lines + [format_line, language_line, ] + pragma_lines + content_lines
+            else:
+                changedtext = master_lines + [format_line, language_line, ] + pragma_lines + content_lines
         else:
             changedtext = comment_lines + master_lines + acl_lines + [format_line, language_line, ] + pragma_lines + content_lines
         changedtext = '\n'.join(changedtext)