Ticket #909 (closed enhancement: fixed)
[patch] Support for query: link syntax in WikiFormatting
| Reported by: | cboos@… | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.9 |
| Component: | wiki system | Version: | devel |
| Severity: | normal | Keywords: | query |
| Cc: |
Description
The proposed addition is quite simple: the query: string should be followed directly by the GET arguments.
As long as the query module uses the GET method, one can compose an arbitrarily complex query, and then copy/paste the link from the Web browser to the wiki page editor.
-
WikiFormatter.py
=== WikiFormatter.py ==================================================================
116 116 r"""(?P<tickethref>!?#(?P<t_intertrac>[a-zA-z]?)\d+)""", 117 117 r"""(?P<changesethref>!?\[(?P<c_intertrac>[a-zA-z]?)\d+\])""", 118 118 r"""(?P<reporthref>!?\{\d+\})""", 119 r"""(?P<modulehref>!?((?P<modulename>bug|ticket|browser|source|repos|report| changeset|wiki|milestone|search):(?P<moduleargs>("(.*?)"|'(.*?)')|([^ ]*[^\., \)]))))""",119 r"""(?P<modulehref>!?((?P<modulename>bug|ticket|browser|source|repos|report|query|changeset|wiki|milestone|search):(?P<moduleargs>("(.*?)"|'(.*?)')|([^ ]*[^\., \)]))))""", 120 120 r"""(?P<wikilink>!?(^|(?<=[^A-Za-z]))[A-Z][a-z]+(?:[A-Z][a-z]*[a-z/])+(?=\Z|\s|,|\.|:|\)))""", 121 121 r"""(?P<fancylink>!?\[(?P<fancyurl>([a-z]+:[^ ]+)) (?P<linkname>.*?)\])"""] 122 122 … … 258 258 return self._href.wiki(args), '%s:%s' % (module, args), 0, None 259 259 elif module == 'report': 260 260 return self._href.report(args), '%s:%s' % (module, args), 0, None 261 elif module == 'query': 262 if args and args[0] == '?': 263 return self._href.query() + args, '%s:%s' % (module, args), 0, None 264 else: 265 return self._href.query(), '%s:%s' % (module, args), 1, None 261 266 elif module == 'changeset': 262 267 cursor = self.db.cursor () 263 268 cursor.execute('SELECT message FROM revision WHERE rev=%s', args)
Attachments
Change History
Note: See
TracTickets for help on using
tickets.


