changeset 357:04ad48f1d36b

globaledit: treat Templates different imported from: moin--main--1.5--patch-361
author Thomas Waldmann <tw@waldmann-edv.de>
date Tue, 03 Jan 2006 21:09:42 +0000
parents 10ed8760784d
children 1ebd874dc552
files MoinMoin/scripts/globaledit.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/scripts/globaledit.py	Mon Jan 02 14:50:28 2006 +0000
+++ b/MoinMoin/scripts/globaledit.py	Tue Jan 03 21:09:42 2006 +0000
@@ -18,7 +18,7 @@
 sys.path.insert(0, '../..')
 
 def do_edit(pagename, origtext):
-    if pagename in ['LocalSpellingWords','LocalBadContent',]:
+    if pagename in ['LocalSpellingWords','LocalBadContent',] or pagename.endswith('Template'):
         return origtext
     language_line = format_line = masterpage = None
     acl_lines = []
@@ -73,7 +73,10 @@
     if content_lines and content_lines[-1].strip(): # not an empty line at EOF
         content_lines.append('')
 
-    changedtext = comment_lines + master_lines + acl_lines + [format_line, language_line,] + pragma_lines + content_lines
+    if masterpage.endswith('Template'):
+        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)
     return changedtext