From 91a543ea63973c15dc58b6ec91501a5b3c117bbe Mon Sep 17 00:00:00 2001 From: Simon Welsh Date: Thu, 12 Mar 2015 21:38:22 +1100 Subject: [PATCH] Null out the order by clause --- code/GoogleSitemap.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/GoogleSitemap.php b/code/GoogleSitemap.php index aaa6050..02b8ba9 100644 --- a/code/GoogleSitemap.php +++ b/code/GoogleSitemap.php @@ -286,6 +286,7 @@ class GoogleSitemap { $lastEdited = $instances ->limit($countPerFile, ($i - 1) * $countPerFile) + ->sort(array()) ->max('LastEdited'); $lastModified = ($lastEdited) ? date('Y-m-d', strtotime($lastEdited)) : date('Y-m-d'); @@ -400,4 +401,4 @@ class GoogleSitemap { public static function enabled() { return (Config::inst()->get('GoogleSitemap', 'enabled', Config::INHERITED)); } -} \ No newline at end of file +}