comparison MoinMoin/PageGraphicalEditor.py @ 4444:b757ecd984fb

Fix headers already sent exception in GUI editor code when using e.g. edit LOCKing
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 21 Nov 2008 18:28:29 +0100
parents bf72cc397f76
children 26b4a39b2f7d 37306fba2189
comparison
equal deleted inserted replaced
4406:4a125e9b0a6e 4444:b757ecd984fb
49 from MoinMoin.action import SpellCheck 49 from MoinMoin.action import SpellCheck
50 50
51 request = self.request 51 request = self.request
52 form = request.form 52 form = request.form
53 _ = self._ 53 _ = self._
54 request.disableHttpCaching(level=2)
55 request.emit_http_headers()
56 54
57 raw_body = '' 55 raw_body = ''
58 msg = None 56 msg = None
59 conflict_msg = None 57 conflict_msg = None
60 edit_lock_message = None 58 edit_lock_message = None
84 # Did one of the prechecks fail? 82 # Did one of the prechecks fail?
85 if msg: 83 if msg:
86 request.theme.add_msg(msg, "error") 84 request.theme.add_msg(msg, "error")
87 self.send_page() 85 self.send_page()
88 return 86 return
87
88 # Emit http_headers after checks (send_page)
89 request.disableHttpCaching(level=2)
90 request.emit_http_headers()
89 91
90 # check if we want to load a draft 92 # check if we want to load a draft
91 use_draft = None 93 use_draft = None
92 if 'button_load_draft' in form: 94 if 'button_load_draft' in form:
93 wanted_draft_timestamp = int(form.get('draft_ts', ['0'])[0]) 95 wanted_draft_timestamp = int(form.get('draft_ts', ['0'])[0])