mirror of
https://github.com/processwire/processwire.git
synced 2025-08-17 20:11:46 +02:00
Add feature request processwire/processwire-requests#386
This commit is contained in:
@@ -459,6 +459,12 @@ class ProcessPageList extends Process implements ConfigurableModule {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function ___find($selectorString, Page $page) {
|
public function ___find($selectorString, Page $page) {
|
||||||
|
if($page->id === $this->wire()->config->trashPageID && !preg_match('/\bsort=/', $selectorString)) {
|
||||||
|
$sortfield = $page->sortfield();
|
||||||
|
if(!$sortfield || $sortfield === 'sort') {
|
||||||
|
$selectorString = trim("$selectorString,sort=-modified", ',');
|
||||||
|
}
|
||||||
|
}
|
||||||
return $page->children($selectorString);
|
return $page->children($selectorString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user