Fixed bug causing the ancestry to not be looked at correctly when trying to find the sort column (Fixes #100)

This commit is contained in:
UndefinedOffset 2017-04-18 09:31:47 -03:00
parent 06517fc3af
commit 09b295d10d
1 changed files with 1 additions and 1 deletions

View File

@ -559,7 +559,7 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
$table=false;
$classes=ClassInfo::ancestry($className, true);
foreach($classes as $class) {
$db = Config::inst()->get($className, "db", CONFIG::UNINHERITED);
$db = Config::inst()->get($class, "db", CONFIG::UNINHERITED);
if(!empty($db) && array_key_exists($sortColumn, $db)) {
$table=$class;
break;