diff --git a/core/model/Hierarchy.php b/core/model/Hierarchy.php index f93775c4c..b5156f172 100644 --- a/core/model/Hierarchy.php +++ b/core/model/Hierarchy.php @@ -329,7 +329,7 @@ class Hierarchy extends DataObjectDecorator { continue; } $idList[] = $child->ID; - $child->extInstance('Hierarchy')->loadDescendantIDListInto($idList); + $child->loadDescendantIDListInto($idList); } } } @@ -578,4 +578,4 @@ class Hierarchy extends DataObjectDecorator { } } -?> \ No newline at end of file +?> diff --git a/core/model/Translatable.php b/core/model/Translatable.php index f3d7659ab..558528d31 100755 --- a/core/model/Translatable.php +++ b/core/model/Translatable.php @@ -591,14 +591,13 @@ class Translatable extends DataObjectDecorator { ); $this->original_values = $originalRecord->getAllFields(); $alltasks = array( 'dup' => array()); - $field = $fields->current(); - do { + foreach($fields as $field) { if ($field->isComposite()) { $innertasks = $this->duplicateOrReplaceFields($field->FieldSet()); // more efficient and safe than array_merge_recursive $alltasks['dup'] = array_merge($alltasks['dup'],$innertasks['dup']); } - } while ($field = $fields->next()); + } foreach ($alltasks['dup'] as $fieldname => $newfield) { // Duplicate the field $fields->replaceField($fieldname,$newfield);