mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: Updated ModelAsController->findOldPage() query to be cross-database compatible.
From: Andrew Short <andrewjshort@gmail.com> git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88799 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
94d2913f09
commit
2be58d19f3
@ -120,7 +120,7 @@ class ModelAsController extends Controller implements NestedController {
|
||||
$query = new SQLQuery (
|
||||
'"RecordID"',
|
||||
'"SiteTree_versions"',
|
||||
"\"URLSegment\" = '$URLSegment' AND \"WasPublished\"" . (SiteTree::nested_urls() ? ' AND "ParentID" = 0' : null),
|
||||
"\"URLSegment\" = '$URLSegment' AND \"WasPublished\" = 1" . (SiteTree::nested_urls() ? ' AND "ParentID" = 0' : null),
|
||||
'"LastEdited" DESC',
|
||||
null,
|
||||
null,
|
||||
|
Loading…
x
Reference in New Issue
Block a user