changeset 1157:bd5b43d70399

Refactored conflict flag detection from the edit action into the PageEditor class.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Tue, 08 Aug 2006 15:27:20 +0200
parents 637d90f1209d
children 353c493dfb77
files MoinMoin/PageEditor.py MoinMoin/action/edit.py
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/PageEditor.py	Mon Aug 07 23:10:06 2006 +0200
+++ b/MoinMoin/PageEditor.py	Tue Aug 08 15:27:20 2006 +0200
@@ -918,6 +918,9 @@
         backup_url = self._make_backup(newtext, **kw)
         action = kw.get('action', 'SAVE')
 
+        # remember conflict state
+        self.setConflict(wikiutil.containsConflictMarker(newtext))
+
         #!!! need to check if we still retain the lock here
         #!!! rev check is not enough since internal operations use "0"
 
--- a/MoinMoin/action/edit.py	Mon Aug 07 23:10:06 2006 +0200
+++ b/MoinMoin/action/edit.py	Tue Aug 08 15:27:20 2006 +0200
@@ -135,8 +135,6 @@
     # Save new text
     else:
         try:
-            still_conflict = wikiutil.containsConflictMarker(savetext)
-            pg.setConflict(still_conflict)
             savemsg = pg.saveText(savetext, rev, trivial=trivial, comment=comment)
         except pg.EditConflict, e:
             msg = e.message