Commits

Thomas Waldmann committed 69c0d9f

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

Comments (0)

Files changed (1)

MoinMoin/items/__init__.py

             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: