This commit is contained in:
Miroslav Stampar
2020-09-23 15:22:07 +02:00
parent 5d08b9004e
commit 7460b87f1d
3 changed files with 9 additions and 4 deletions

View File

@@ -410,9 +410,11 @@ class Search(object):
if tblCond:
if conf.tbl:
_ = conf.tbl.split(',')
whereTblsQuery = " AND (" + " OR ".join("%s = '%s'" % (tblCond, unsafeSQLIdentificatorNaming(tbl)) for tbl in _) + ")"
infoMsgTbl = " for table%s '%s'" % ("s" if len(_) > 1 else "", ", ".join(unsafeSQLIdentificatorNaming(tbl) for tbl in _))
tbls = conf.tbl.split(',')
if conf.exclude:
tbls = [_ for _ in tbls if re.search(conf.exclude, _, re.I) is None]
whereTblsQuery = " AND (" + " OR ".join("%s = '%s'" % (tblCond, unsafeSQLIdentificatorNaming(tbl)) for tbl in tbls) + ")"
infoMsgTbl = " for table%s '%s'" % ("s" if len(tbls) > 1 else "", ", ".join(unsafeSQLIdentificatorNaming(tbl) for tbl in tbls))
if conf.db == CURRENT_DB:
conf.db = self.getCurrentDb()