equal
deleted
inserted
replaced
340 raise |
340 raise |
341 except Redirect: |
341 except Redirect: |
342 # redirect is raised by edit controller when everything went fine, |
342 # redirect is raised by edit controller when everything went fine, |
343 # so try to commit |
343 # so try to commit |
344 try: |
344 try: |
345 req.cnx.commit() |
345 txuuid = req.cnx.commit() |
|
346 if txuuid is not None: |
|
347 msg = u'<span class="undo">[<a href="%s">%s</a>]</span>' %( |
|
348 req.build_url('undo', txuuid=txuuid), req._('undo')) |
|
349 req.append_to_redirect_message(msg) |
346 except ValidationError, ex: |
350 except ValidationError, ex: |
347 self.validation_error_handler(req, ex) |
351 self.validation_error_handler(req, ex) |
348 except Unauthorized, ex: |
352 except Unauthorized, ex: |
349 req.data['errmsg'] = req._('You\'re not authorized to access this page. ' |
353 req.data['errmsg'] = req._('You\'re not authorized to access this page. ' |
350 'If you think you should, please contact the site administrator.') |
354 'If you think you should, please contact the site administrator.') |