[Xapian-tickets] [Xapian] #792: Add a CGI param "LOC" to indicate a path to a leaf from database_dir folder
Xapian
nobody at xapian.org
Fri Aug 23 18:30:05 BST 2019
#792: Add a CGI param "LOC" to indicate a path to a leaf from database_dir folder
-------------------------+-------------------------
Reporter: ohallot | Owner: olly
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Omega | Version:
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: All
-------------------------+-------------------------
Comment (by james):
So you have different databases _within_ each language directory? One
approach would be to do something like `fr-DATABASE` for each named
DATABASE. It doesn't separate by two levels of directories, but can be
done now without modification in omega (but of course would need changes
at your end — although you could create your existing structure and then
use symlinks, which would be a minor finishing-up step).
If we do want to go down this road, the main place you'll want to look in
the code is `omega.cc:map_dbname_to_dir()`. CGI parameters are managing
into a multimap called `cgi_params` (which is mostly set up in
`cgiparam.cc` but is used a lot in `omega.cc` so I'd look there).
Some other thoughts:
1. `LOC` would have to not contain a slash, but also shouldn't be `..`.
There may be other characters we'd have to sanitise for security.
2. You'll probably need `xLOC`, acting as `xDB` (it's documented in
`cgiparams.rst` / `cgiparams.html`).
3. `LOC` may not be the best name. `DBGROUP` might make more logical
sense.
--
Ticket URL: <https://trac.xapian.org/ticket/792#comment:1>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list