mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
5e9b78b798
commit
2fc2d72501
@ -3016,9 +3016,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
|||||||
if($ancestorClass == 'ViewableData') break;
|
if($ancestorClass == 'ViewableData') break;
|
||||||
$types = array(
|
$types = array(
|
||||||
'db' => (array) Object::uninherited_static($ancestorClass, 'db'),
|
'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){
|
if($includerelations){
|
||||||
$types['has_one'] = (array)singleton($ancestorClass)->uninherited('has_one', true);
|
$types['has_one'] = (array)singleton($ancestorClass)->uninherited('has_one', true);
|
||||||
|
@ -226,7 +226,7 @@ abstract class BulkLoader extends ViewableData {
|
|||||||
|
|
||||||
// get database columns (fieldlabels include fieldname as a key)
|
// get database columns (fieldlabels include fieldname as a key)
|
||||||
// using $$includerelations flag as false, so that it only contain $db fields
|
// 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_ones = singleton($this->objectClass)->has_one();
|
||||||
$has_manys = singleton($this->objectClass)->has_many();
|
$has_manys = singleton($this->objectClass)->has_many();
|
||||||
|
Loading…
Reference in New Issue
Block a user