Advertisement
Guest User

trac_ticket_notification commit_updater fix

a guest
Sep 18th, 2012
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.09 KB | None | 0 0
  1. --- trac/ticket/notification.py    Tue Sep 18 15:08:52 2012
  2. +++ trac/ticket/notification.py.bak    Tue Feb 28 10:06:34 2012
  3. @@ -27,9 +27,6 @@
  4.  from trac.util.datefmt import to_utimestamp
  5.  from trac.util.text import obfuscate_email_address, text_width, wrap, CRLF
  6.  from trac.util.translation import deactivate, reactivate
  7. -from trac.web.api import Request
  8. -from StringIO import StringIO
  9. -import trac.perm as perm
  10.  
  11.  class TicketNotificationSystem(Component):
  12.  
  13. @@ -117,22 +114,11 @@
  14.                                                  ticket, self.db, when=modtime):
  15.                  if not change['permanent']: # attachment with same time...
  16.                      continue
  17. -                if self.req is None:
  18. -                    self.env.log.warning("Req is None - a dummy Req is made so that wiki to html works")
  19. -                    tracurl = self.env.base_url.replace("http://","")
  20. -                    environ = {'REQUEST_METHOD': 'GET', 'SCRIPT_NAME': '', 'SERVER_PORT': 80, 'SERVER_NAME': tracurl,
  21. -                               'wsgi.url_scheme': 'http', 'wsgi.input': StringIO('')}
  22. -                    self.req = Request(environ, None)
  23. -                    self.req.perm = perm.PermissionCache(self.env)
  24. -                    change_data.update({
  25. -                        'author': change['author'],
  26. -                        'comment': wiki_to_html(change['comment'], env=self.env, req=self.req, absurls=True)
  27. -                        })
  28. -                else:
  29. -                    change_data.update({
  30. -                        'author': change['author'],
  31. -                        'comment': wiki_to_html(change['comment'], env=self.env, req=self.req, absurls=True)
  32. -                        })
  33. +                change_data.update({
  34. +                    'author': change['author'],
  35. +                    'comment': wiki_to_html(change['comment'], env=self.env, req=self.req, absurls=True)
  36. +
  37. +                    })
  38.                  link += '#comment:%s' % str(change.get('cnum', ''))
  39.                  for field, values in change['fields'].iteritems():
  40.                      old = values['old']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement