Skip to content

Commit

Permalink
Wiki-format search results. Ignore trailing slashes on wiki page names.
Browse files Browse the repository at this point in the history
git-svn-id: http://trac.edgewall.org/intertrac/log:/trunk@100 af82e41b-90c4-0310-8c96-b1721e28e2e2
  • Loading branch information
jonas committed Feb 8, 2004
1 parent d972b87 commit d8e3a58
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions trac/Module.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def run(self):
self.cgi.hdf.setValue('error.action', e.action)
self.cgi.hdf.setValue('error.message', str(e))
self.template_name = 'error.cs'
Module.apply_template(self)
except Exception, e:
# Catch exceptions and let error.cs display
# a pretty error message + traceback.
Expand Down
3 changes: 2 additions & 1 deletion trac/Search.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from util import *
from Href import href
from Module import Module
from Wiki import wiki_to_oneliner
import db
import perm

Expand Down Expand Up @@ -71,7 +72,7 @@ def perform_query (self, query, changeset, tickets):
if not row:
break
item = {'type': row['type'],
'message': row['message'],
'message': wiki_to_oneliner(row['message']),
'data': row['data'],
'author': row['author']}
if row['type'] == '1':
Expand Down
3 changes: 1 addition & 2 deletions trac/trac.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def parse_args():
if re.search('/search/?', info):
args['mode'] = 'search'
return args
match = re.search('/wiki/(.*)/?', info)
match = re.search('/wiki/(.*[^/])/?', info)
if match:
args['mode'] = 'wiki'
if len(match.group(1)) > 0:
Expand Down Expand Up @@ -124,7 +124,6 @@ def main():
args[x] = _args[x].value

mode = dict_get_with_default(args, 'mode', 'wiki')

module_name, constructor_name, need_svn = modules[mode]
module = __import__(module_name, globals(), locals(), [])
constructor = getattr(module, constructor_name)
Expand Down

0 comments on commit d8e3a58

Please sign in to comment.