Filter all library and user data for guests
This commit is contained in:
@@ -89,16 +89,15 @@ class DataTables(object):
|
||||
# Build custom where parameters
|
||||
if custom_where:
|
||||
for w in custom_where:
|
||||
c_where += w[0] + ' = ? AND '
|
||||
|
||||
# The order of our args changes if we are grouping
|
||||
#if grouping:
|
||||
# args.insert(0, w[1])
|
||||
#else:
|
||||
# args.append(w[1])
|
||||
|
||||
# My testing shows that order of args doesn't change
|
||||
args.append(w[1])
|
||||
if isinstance(w[1], (list, tuple)) and len(w[1]):
|
||||
c_where += '('
|
||||
for w_ in w[1]:
|
||||
c_where += w[0] + ' = ? OR '
|
||||
args.append(w_)
|
||||
c_where = c_where.rstrip(' OR ') + ') AND '
|
||||
else:
|
||||
c_where += w[0] + ' = ? AND '
|
||||
args.append(w[1])
|
||||
|
||||
if c_where:
|
||||
c_where = 'WHERE ' + c_where.rstrip(' AND ')
|
||||
|
Reference in New Issue
Block a user