Content server: Fix --url-prefix not used for links in the book details view.

This commit is contained in:
Kovid Goyal 2011-09-03 08:24:46 -06:00
parent c756509cb3
commit 2425e2c09b
2 changed files with 4 additions and 2 deletions

View File

@ -49,6 +49,8 @@ class DispatchController(object): # {{{
elif self.prefix:
self.dispatcher.connect(name+'prefix_extra', self.prefix, self,
**kwargs)
self.dispatcher.connect(name+'prefix_extra_trailing',
self.prefix+'/', self, **kwargs)
self.dispatcher.connect(name, route, self, **kwargs)
self.funcs.append(expose(func))

View File

@ -695,8 +695,8 @@ class BrowseServer(object):
for tag in dbtags:
tval = ('<a title="Browse books by {3}: {0}"'
' href="{1}" class="details_category_link">{2}</a>')
href='/browse/matches/%s/%s' % \
(quote(tag.category), quote(str(tag.id)))
href='%s/browse/matches/%s/%s' % \
(self.opts.url_prefix, quote(tag.category), quote(str(tag.id)))
vals.append(tval.format(xml(tag.name, True),
xml(href, True),
xml(val if len(dbtags) == 1 else tag.name),