added # matches on show persons page, and fixed issue with search OPT being hardcoded and not using those in the DB
This commit is contained in:
24
options.py
24
options.py
@@ -93,26 +93,32 @@ class Options(PA):
|
||||
self.cwd='static/' + self.path_type
|
||||
self.root=self.cwd
|
||||
|
||||
# the above are defaults, if we are here, then we have current values, use them instead
|
||||
# the above are defaults, if we are here, then we have current values, use them instead if they are set -- AI: searches dont set them so then we use those in the DB first
|
||||
if request.method=="POST":
|
||||
self.noo=request.form['noo']
|
||||
self.how_many=request.form['how_many']
|
||||
self.offset=int(request.form['offset'])
|
||||
self.grouping=request.form['grouping']
|
||||
if 'noo' in request.form:
|
||||
self.noo=request.form['noo']
|
||||
if 'how_many' in request.form:
|
||||
self.how_many=request.form['how_many']
|
||||
if 'offset' in request.form:
|
||||
self.offset=int(request.form['offset'])
|
||||
if 'grouping' in request.form:
|
||||
self.grouping=request.form['grouping']
|
||||
# this can be null if we come from view by details
|
||||
if request.form['size']:
|
||||
if 'size' in request.form:
|
||||
self.size = request.form['size']
|
||||
# seems html cant do boolean, but uses strings so convert
|
||||
if request.form['folders'] == "False":
|
||||
if 'folders' not in request.form or request.form['folders'] == "False":
|
||||
self.folders=False
|
||||
if request.form['folders'] == "True":
|
||||
elif request.form['folders'] == "True":
|
||||
self.folders=True
|
||||
# have to force grouping to None if we flick to folders from a flat
|
||||
# view with grouping (otherwise we print out group headings for
|
||||
# child content that is not in the CWD)
|
||||
self.grouping=None
|
||||
|
||||
self.cwd = request.form['cwd']
|
||||
# possible to not be set for an AI: search
|
||||
if 'cwd' in request.form:
|
||||
self.cwd = request.form['cwd']
|
||||
if 'fullscreen' in request.form:
|
||||
self.fullscreen=request.form['fullscreen']
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user