From 2fc2d72501ff80eb77054b63cc1dcf7e32fd7688 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 11 Feb 2010 02:18:54 +0000 Subject: [PATCH] BUGFIX Fixed DataObject->fieldLabels() to respect flag git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@98748 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/DataObject.php | 3 --- dev/BulkLoader.php | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/core/model/DataObject.php b/core/model/DataObject.php index f9539e5b0..eef90ad7f 100755 --- a/core/model/DataObject.php +++ b/core/model/DataObject.php @@ -3016,9 +3016,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity if($ancestorClass == 'ViewableData') break; $types = array( 'db' => (array) Object::uninherited_static($ancestorClass, 'db'), - 'has_one' => (array) Object::uninherited_static($ancestorClass, 'has_one'), - 'has_many' => (array) Object::uninherited_static($ancestorClass, 'has_many'), - 'many_many' => (array) Object::uninherited_static($ancestorClass, 'many_many') ); if($includerelations){ $types['has_one'] = (array)singleton($ancestorClass)->uninherited('has_one', true); diff --git a/dev/BulkLoader.php b/dev/BulkLoader.php index a6a24109e..082447c05 100644 --- a/dev/BulkLoader.php +++ b/dev/BulkLoader.php @@ -226,7 +226,7 @@ abstract class BulkLoader extends ViewableData { // get database columns (fieldlabels include fieldname as a key) // using $$includerelations flag as false, so that it only contain $db fields - $spec['fields'] = (array)singleton($this->objectClass)->fieldLabels($includerelations=false); + $spec['fields'] = (array)singleton($this->objectClass)->fieldLabels(false); $has_ones = singleton($this->objectClass)->has_one(); $has_manys = singleton($this->objectClass)->has_many();