1. Ronny Pfannschmidt
  2. moin-2.0

Commits

Thomas Waldmann  committed 69c0d9f

modify: put real base rev no into the hidden form field

  • Participants
  • Parent commits e93157b
  • Branches default

Comments (0)

Files changed (1)

File MoinMoin/items/__init__.py

View file
             form = ModifyForm.from_defaults()
             TextCha(form).amend_form()
             form['meta_text'] = self.meta_dict_to_text(self.meta)
-            form['rev'] = 0 # XXX ???
+            form['rev'] = self.rev.revno if self.rev.revno is not None else -1
         elif request.method == 'POST':
             form = ModifyForm.from_flat(request.form)
             TextCha(form).amend_form()
             else:
                 form['data_text'] = self.data_storage_to_internal(self.data)
             form['meta_text'] = self.meta_dict_to_text(self.meta)
-            form['rev'] = 0 # XXX ???
+            form['rev'] = self.rev.revno if self.rev.revno is not None else -1
         elif request.method == 'POST':
             form = ModifyForm.from_flat(request.form)
             TextCha(form).amend_form()
             TextCha(form).amend_form()
             # XXX currently this is rather pointless, as the form does not get POSTed:
             form['meta_text'] = self.meta_dict_to_text(self.meta)
-            form['rev'] = 0 # XXX ???
+            form['rev'] = self.rev.revno if self.rev.revno is not None else -1
         elif request.method == 'POST':
             # this POST comes directly from TWikiDraw (not from Browser), thus no validation
             try:
             TextCha(form).amend_form()
             # XXX currently this is rather pointless, as the form does not get POSTed:
             form['meta_text'] = self.meta_dict_to_text(self.meta)
-            form['rev'] = 0 # XXX ???
+            form['rev'] = self.rev.revno if self.rev.revno is not None else -1
         elif request.method == 'POST':
             # this POST comes directly from AnyWikiDraw (not from Browser), thus no validation
             try:
             TextCha(form).amend_form()
             # XXX currently this is rather pointless, as the form does not get POSTed:
             form['meta_text'] = self.meta_dict_to_text(self.meta)
-            form['rev'] = 0 # XXX ???
+            form['rev'] = self.rev.revno if self.rev.revno is not None else -1
         elif request.method == 'POST':
             # this POST comes directly from SvgDraw (not from Browser), thus no validation
             try: