Opened 18 years ago
Last modified 17 years ago
#2432 closed defect
Wiki timeline URLs should contain the version — at Version 1
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | high | Milestone: | 0.11 |
Component: | timeline | Version: | 0.9 |
Severity: | major | Keywords: | rss |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
URLs constructed on the timeline page and rss version for changes to Wiki pages only contain links to the Wiki page that was changed, not to the actual version of the Wiki page. This leads to non-unique URLs in the rss feeds which break many readers, as well as having links on the timeline to non specific Wiki page versions. This patch corrects this issue:
-
trac/wiki/web_ui.py
old new 129 129 format = req.args.get('format') 130 130 db = self.env.get_db_cnx() 131 131 cursor = db.cursor() 132 cursor.execute("SELECT time,name,comment,author "132 cursor.execute("SELECT time,name,comment,author,version " 133 133 "FROM wiki WHERE time>=%s AND time<=%s", 134 134 (start, stop)) 135 for t,name,comment,author in cursor:135 for t,name,comment,author,version in cursor: 136 136 title = '<em>%s</em> edited by %s' % ( 137 137 escape(name), escape(author)) 138 138 if format == 'rss': 139 href = self.env.abs_href.wiki(name)139 href = escape(self.env.abs_href.wiki(name,version=version)) 140 140 comment = wiki_to_html(comment or '--', self.env, db, 141 141 absurls=True) 142 142 else: 143 href = self.env.href.wiki(name)143 href = escape(self.env.href.wiki(name,version=version)) 144 144 comment = wiki_to_oneliner(comment, self.env, db, 145 145 shorten=True) 146 146 yield 'wiki', href, title, t, author, comment
Change History (2)
by , 18 years ago
Attachment: | web_ui.py.patch added |
---|
comment:1 by , 18 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
(fixed description)