1. Alex Willmer
  2. trac-ticketlinks

Commits

cmlenz  committed 18ca885

Ported [1139] to stable.

  • Participants
  • Parent commits 9b37f76
  • Branches 0.8-stable

Comments (0)

Files changed (2)

File THANKS

View file
 Juracy Filho            juracy@gmail.com
 Cap Petschulat          cap@cdres.com
 Nicholas Riley          sabi
+Manuzhai                manuzhai@gmail.com
 Mark Rowe               mrowe@bluewire.net.nz
 Olliver Rutherfurd      ollie
 pkou                    pkou@ua.fm

File trac/Timeline.py

View file
     def render (self):
         self.perm.assert_permission(perm.TIMELINE_VIEW)
 
-        self.add_link('alternate', '?daysback=90&max=50&format=rss',
-            'RSS Feed', 'application/rss+xml', 'rss')
-
         _from = self.args.get('from', '')
         _daysback = self.args.get('daysback', '')
 
         if milestone:
             self.req.hdf.setValue('timeline.milestone', 'checked')
 
+        rssargs = []
+        if wiki:
+            rssargs.append('wiki=on')
+        if ticket:
+            rssargs.append('ticket=on')
+        if changeset:
+            rssargs.append('changeset=on')
+        if milestone:
+            rssargs.append('milestone=on')
+        if rssargs:
+            rssargs = '&' + '&'.join(rssargs)
+        self.add_link('alternate',
+            '?daysback=90&max=50%s&format=rss' % rssargs,
+            'RSS Feed', 'application/rss+xml', 'rss')
+
         info = self.get_info (start, stop, maxrows, ticket,
                               changeset, wiki, milestone)
         util.add_dictlist_to_hdf(info, self.req.hdf, 'timeline.items')