mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merged revisions 54472 via svnmerge from
svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.2.2 ........ r54472 | aoneil | 2008-05-13 21:11:42 +1200 (Tue, 13 May 2008) | 2 lines BUGFIX #2504 - Fixed translation interface not working in CMS ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@56906 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
7fd61813b6
commit
172bf71ead
@ -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 {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user