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:
Andrew O'Neil 2008-06-25 03:58:21 +00:00
parent 7fd61813b6
commit 172bf71ead
2 changed files with 4 additions and 5 deletions

View File

@ -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 {
}
}
?>
?>

View File

@ -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);