web/views/basecontrollers.py
changeset 8084 e22c17e1710d
parent 8056 8909800a8c51
child 8116 6510654269a6
--- a/web/views/basecontrollers.py	Tue Nov 15 22:22:18 2011 +0100
+++ b/web/views/basecontrollers.py	Tue Nov 15 22:23:14 2011 +0100
@@ -578,12 +578,11 @@
     __select__ = match_form_params('description')
 
     def publish(self, rset=None):
-        body = self._cw.form['description']
-        self.sendmail(self._cw.config['submit-mail'],
-                      self._cw._('%s error report') % self._cw.config.appid,
-                      body)
-        url = self._cw.build_url(__message=self._cw._('bug report sent'))
-        raise Redirect(url)
+        req = self._cw
+        self.sendmail(req.vreg.config['submit-mail'],
+                      req._('%s error report') % req.vreg.config.appid,
+                      req.form['description'])
+        raise Redirect(req.build_url(__message=req._('bug report sent')))
 
 
 class UndoController(Controller):