Merge pull request #2804 from creative-commoners/pulls/5/sortraw

FIX Use orderBy() instead of sort()
This commit is contained in:
Guy Sartorelli 2022-12-07 14:53:18 +13:00 committed by GitHub
commit 8b1433b263
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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