Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 2fc2d72501ff80eb77054b63cc1dcf7e32fd7688 1 parent 5e9b78b
@chillu chillu authored
Showing with 1 addition and 4 deletions.
  1. +0 −3  core/model/DataObject.php
  2. +1 −1  dev/BulkLoader.php
View
3  core/model/DataObject.php
@@ -3016,9 +3016,6 @@ public function fieldLabels($includerelations = true) {
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
2  dev/BulkLoader.php
@@ -226,7 +226,7 @@ public function getImportSpec() {
// 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();
Please sign in to comment.
Something went wrong with that request. Please try again.