1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 10:15:28 +02:00

Fix issue in ProcessPageLister/ProcessPageListerPro where it wasn't allowing header click-to-sort on all columns where it was supported

This commit is contained in:
Ryan Cramer
2023-06-25 09:10:26 -04:00
parent 3fa65dfc83
commit 1830bf124b

View File

@@ -1257,7 +1257,13 @@ class ProcessPageLister extends Process implements ConfigurableModule {
if($subfield === 'keys' || $subfield === 'xtra') return false;
$fieldtype = $field->type;
$schema = $fieldtype->getDatabaseSchema($field);
return isset($schema[$subfield]);
if(isset($schema[$subfield])) return true;
$selectorInfo = $fieldtype->getSelectorInfo($field);
if(isset($selectorInfo['input']) && $selectorInfo['input'] === 'page') {
if(isset($selectorInfo['subfields'][$subfield])) return true;
if($this->wire()->pages->loader()->isNativeColumn($subfield)) return true;
}
return false;
}
/**