#3294: [PATCH] Trac fails to set HDF var `wiki.page_name` when viewing
`WikiStart`
page
---------------------------+------------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: jonas
Type: defect | Status: new
Priority: normal | Milestone: 0.10
Component: wiki | Version: devel
Severity: normal | Keywords:
---------------------------+------------------------------------------------
Trac fails to set the HDF variable `wiki.page_name` when viewing the
`WikiStart` page.
This can trip up plugins such as wiki macros, or force them to insert an
unnecessary special case.
The problem occurs because code in trac/wiki/web_ui.py tries to re-
implement the `_set_title` function as a special case for `WikiStart`, and
omits part of the functionality (setting `wiki.page_name`). The fix is to
simply make use of `_set_title` unconditionally, and then tweak the
results as a special case for `WikiStart`:
{{{
Index: trac/wiki/web_ui.py
===================================================================
--- trac/wiki/web_ui.py (revision 3431)
+++ trac/wiki/web_ui.py (working copy)
@@ -398,11 +398,9 @@
def _render_view(self, req, db, page):
req.perm.assert_permission('WIKI_VIEW')
+ page_name = self._set_title(req, page, '')
if page.name == 'WikiStart':
req.hdf['title'] = ''
- page_name = 'WikiStart'
- else:
- page_name = self._set_title(req, page, '')
version = req.args.get('version')
if version:
}}}
--
Ticket URL: <http://projects.edgewall.com/trac/ticket/3294>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets