FIX Use orderBy() instead of sort()

This commit is contained in:
Steve Boyd 2022-12-05 17:46:44 +13:00
parent 911a71d6f6
commit 3186e0e129

View File

@ -31,7 +31,7 @@ class RecentlyEditedReport extends Report
$threshold = strtotime('-14 days', DBDatetime::now()->getTimestamp());
return SiteTree::get()
->filter('LastEdited:GreaterThan', date("Y-m-d H:i:s", $threshold))
->sort("\"$tableName\".\"LastEdited\" DESC");
->orderBy("\"$tableName\".\"LastEdited\" DESC");
}
public function columns()