From b39ebec8123b34a571883ce6a9d9c07941391769 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Tue, 29 Nov 2016 06:46:52 +1100 Subject: [PATCH] Pass columns to search scope This allows the default search to be applied and combined with any custom constraints --- modules/backend/widgets/Lists.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/backend/widgets/Lists.php b/modules/backend/widgets/Lists.php index c61dba1a9..acc8e9b2d 100644 --- a/modules/backend/widgets/Lists.php +++ b/modules/backend/widgets/Lists.php @@ -1181,8 +1181,8 @@ class Lists extends WidgetBase if ($scopeMethod = $this->searchScope) { $searchMethod = $boolean == 'and' ? 'where' : 'orWhere'; - $query->$searchMethod(function($q) use ($term, $scopeMethod) { - $q->$scopeMethod($term); + $query->$searchMethod(function($q) use ($term, $columns, $scopeMethod) { + $q->$scopeMethod($term, $columns); }); } else {