mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Fixed DataObject::fieldLabels() to detect labels on inherited database fields
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60726 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
4dc20e699d
commit
125ca5801b
@ -2424,8 +2424,8 @@ class DataObject extends ViewableData implements DataObjectInterface {
|
||||
public function fieldLabels($fieldName = false) {
|
||||
$customLabels = $this->stat('field_labels');
|
||||
$autoLabels = array();
|
||||
if($this->databaseFields()){
|
||||
foreach($this->databaseFields() as $name => $type) {
|
||||
if($this->inheritedDatabaseFields()){
|
||||
foreach($this->inheritedDatabaseFields() as $name => $type) {
|
||||
$autoLabels[$name] = FormField::name_to_label($name);
|
||||
}
|
||||
$labels = array_merge((array)$autoLabels, (array)$customLabels);
|
||||
|
Loading…
x
Reference in New Issue
Block a user