koniu / recoll-webui

web interface for recoll desktop search
266 stars 55 forks source link

Settings page (relative paths) #4

Closed nberelidze closed 11 years ago

nberelidze commented 11 years ago

Hi,

First of all thanks for such a wonderful script!

I'm trying to install it as a wsgi under apache and encountered a problem with relative paths. I'm running it as http://webserver/recoll not as http://webserver. Three changes should be made:

1) views/settings.tpl <a href="./"><input type="button" value="Cancel"></a> insetad of <a href=".."><input type="button" value="Cancel"></a>

2) views/search.tpl <a href="./" tabindex="-1"><input type="button" value="Reset"></a>&nbsp; instead of <a href=".." tabindex="-1"><input type="button" value="Reset"></a>&nbsp;

3) webui.py bottle.redirect('./') instead of bottle.redirect('..') in def set():

Your recommendations about apache/wsgi configuration are welcome as well.

Nika

koniu commented 11 years ago

Thanks for pointing this out and even more for the suggested changes - I have to admit that I haven't tried running the webui via WSGI and so never stumbled upon this one. There was three other places in the code where .. was used (CSV/JSON links + page links) which I also changed to ./ for consistency. Tested on standalone, I hope it doesn't break WSGI in some weird way. Do tell if it does, I'm not thinking too clearly today.

nberelidze commented 11 years ago

I didn't use JSON/CSV and missed them completely. Confirm that your changes are just fine. A small comment though: '..' doesn't break WSGI, it breaks webui running other than in the root of the web-server.