Ticket #1929: attachment.py-link_with_params.patch
| File attachment.py-link_with_params.patch, 1.1 KB (added by Shunichi Goto <gotoh@…>, 7 years ago) |
|---|
-
attachment.py
461 461 parent_type = path_info[1] 462 462 if len(path_info) > 2: 463 463 parent_id = path_info[2] 464 filename = link 464 idx = link.find('?') 465 if idx < 0: 466 filename = link 467 params = '' 468 else: 469 filename = link[0:idx] 470 params = link[idx:] 465 471 try: 466 472 attachment = Attachment(self.env, parent_type, parent_id, filename) 467 473 return '<a class="attachment" title="%s" href="%s">%s</a>' \ 468 474 % ('Attachment ' + attachment.title, 469 attachment.href() , label)475 attachment.href() + params, label) 470 476 except TracError: 471 477 return '<a class="missing attachment" href="%s" rel="nofollow">%s</a>' \ 472 478 % (self.env.href.wiki(), label)
