From aa5f37aae655089a06af7ad7daf627f181ade823 Mon Sep 17 00:00:00 2001 From: CSNWEB Date: Sun, 10 Jan 2016 14:10:49 +0100 Subject: [PATCH] Use Grammar from Query in Widget List When using models with a different database software than the default, the old code produced a syntax error. Using the Grammar from the query ensures that the alias is always wrapped correctly. Suggestion: The code should be scanned for similar errors, produced by using DB Facade. --- modules/backend/widgets/Lists.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/backend/widgets/Lists.php b/modules/backend/widgets/Lists.php index 516f7353a..e23155397 100644 --- a/modules/backend/widgets/Lists.php +++ b/modules/backend/widgets/Lists.php @@ -410,7 +410,7 @@ class Lists extends WidgetBase continue; } - $alias = Db::getQueryGrammar()->wrap($column->columnName); + $alias = $query->getQuery()->getGrammar()->wrap($column->columnName); /* * Relation column