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
This commit is contained in:
Ingo Schommer 2010-02-11 02:18:54 +00:00
parent 5e9b78b798
commit 2fc2d72501
2 changed files with 1 additions and 4 deletions

View File

@ -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);

View File

@ -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();