From 53e2a035f9c401554a38c1a717c5f4c177967ee1 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 10 Jan 2009 07:52:32 +0000 Subject: [PATCH] ENHANCEMENT Calling augmentSQL() on decorators in DataObject::get(), which is necessary (among others) to limit ContentController->getMenu() with Translatable enabled to the currently active language. Was previously just implemented in DataObject::get_one() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69954 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/DataObject.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/model/DataObject.php b/core/model/DataObject.php index ab4704a8a..48b6b8c3d 100644 --- a/core/model/DataObject.php +++ b/core/model/DataObject.php @@ -2226,6 +2226,9 @@ class DataObject extends ViewableData implements DataObjectInterface,i18nEntityP } $query = $this->extendedSQL($filter, $sort, $limit, $join); + + $this->extend('augmentSQL', $query); + $records = $query->execute(); $ret = $this->buildDataObjectSet($records, $containerClass, $query, $this->class);