1
0
Fork 0
mirror of https://github.com/koniu/recoll-webui.git synced 2025-10-03 09:49:25 +02:00

py/tpl: fix #4 ('..' breaks WSGI, use './' instead)

Thanks to nberelidze@github for spotting and providing solution.
This commit is contained in:
koniu 2013-03-03 23:51:09 +00:00
parent 7824cd35d0
commit 740f507c0e
5 changed files with 6 additions and 6 deletions

View file

@ -1,7 +1,7 @@
%q = dict(query) %q = dict(query)
%def page_href(page): %def page_href(page):
%q['page'] = page %q['page'] = page
%return '../results?%s' % urllib.urlencode(q) %return './results?%s' % urllib.urlencode(q)
%end %end
%if nres > 0: %if nres > 0:
%import math, urllib %import math, urllib

View file

@ -7,8 +7,8 @@
</div> </div>
%if len(res) > 0: %if len(res) > 0:
<div id="downloads"> <div id="downloads">
<a href="../json?{{query_string}}">JSON</a> <a href="./json?{{query_string}}">JSON</a>
<a href="../csv?{{query_string}}">CSV</a> <a href="./csv?{{query_string}}">CSV</a>
</div> </div>
%end %end
<br style="clear: both"> <br style="clear: both">

View file

@ -7,7 +7,7 @@
<b>Query</b> <b>Query</b>
<input tabindex="0" type="search" name="query" value="{{query['query']}}" autofocus><br><br> <input tabindex="0" type="search" name="query" value="{{query['query']}}" autofocus><br><br>
<input type="submit" value="Search">&nbsp; <input type="submit" value="Search">&nbsp;
<a href=".." tabindex="-1"><input type="button" value="Reset"></a>&nbsp; <a href="./" tabindex="-1"><input type="button" value="Reset"></a>&nbsp;
<a href="settings" tabindex="-1"><input type="button" value="Settings"></a> <a href="settings" tabindex="-1"><input type="button" value="Settings"></a>
</td> </td>
<td width="30%"> <td width="30%">

View file

@ -23,7 +23,7 @@
%end %end
<br><br><hr> <br><br><hr>
<input type="submit" value="Save"> <input type="submit" value="Save">
<a href=".."><input type="button" value="Cancel"></a> <a href="./"><input type="button" value="Cancel"></a>
</form> </form>
</div> </div>
%include footer %include footer

View file

@ -274,7 +274,7 @@ def set():
for d in config['dirs']: for d in config['dirs']:
cookie_name = 'mount_%s' % urllib.quote(d, '') cookie_name = 'mount_%s' % urllib.quote(d, '')
bottle.response.set_cookie(cookie_name, str(bottle.request.query.get('mount_%s' % d)), max_age=3153600000) bottle.response.set_cookie(cookie_name, str(bottle.request.query.get('mount_%s' % d)), max_age=3153600000)
bottle.redirect('..') bottle.redirect('./')
#}}} #}}}
#}}} #}}}
# vim: fdm=marker:tw=80:ts=4:sw=4:sts=4:et # vim: fdm=marker:tw=80:ts=4:sw=4:sts=4:et