mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #4827 from SilbinaryWolf/fix-fieldLabels-abstract-class-bug
Fixed bug where inheriting an abstract class broke scaffoldFormFields / fieldLabels(true)
This commit is contained in:
commit
959c84cf6f
@ -3631,10 +3631,10 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
'db' => (array)Config::inst()->get($ancestorClass, 'db', Config::UNINHERITED)
|
||||
);
|
||||
if($includerelations){
|
||||
$types['has_one'] = (array)singleton($ancestorClass)->uninherited('has_one', true);
|
||||
$types['has_many'] = (array)singleton($ancestorClass)->uninherited('has_many', true);
|
||||
$types['many_many'] = (array)singleton($ancestorClass)->uninherited('many_many', true);
|
||||
$types['belongs_many_many'] = (array)singleton($ancestorClass)->uninherited('belongs_many_many', true);
|
||||
$types['has_one'] = (array)Config::inst()->get($ancestorClass, 'has_one', Config::UNINHERITED);
|
||||
$types['has_many'] = (array)Config::inst()->get($ancestorClass, 'has_many', Config::UNINHERITED);
|
||||
$types['many_many'] = (array)Config::inst()->get($ancestorClass, 'many_many', Config::UNINHERITED);
|
||||
$types['belongs_many_many'] = (array)Config::inst()->get($ancestorClass, 'belongs_many_many', Config::UNINHERITED);
|
||||
}
|
||||
foreach($types as $type => $attrs) {
|
||||
foreach($attrs as $name => $spec) {
|
||||
|
Loading…
Reference in New Issue
Block a user