[email bug report] _cw.config bw compat has been dropped, use _cw.vreg.config (+ small cleanup). Closes #2086985
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 15 Nov 2011 22:23:14 +0100
changeset 8084 e22c17e1710d
parent 8083 3db2f3317d15
child 8087 dc788369d35f
[email bug report] _cw.config bw compat has been dropped, use _cw.vreg.config (+ small cleanup). Closes #2086985
web/views/basecontrollers.py
--- 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):