bfojcapell: Avoid improductive DB interaction when creating a translatio

(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@42151 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-09-16 17:02:47 +00:00
parent 9d32d9518f
commit 8425e69757

View File

@ -425,7 +425,7 @@ JS;
$originalItem = Translatable::get_original($className,Session::get("{$id}_originalLangID"));
if ($setID) $originalItem->ID = $id;
else {
$originalItem->ID = null;
$originalItem->ID = 'new'; // to avoid creating and deleting a SiteTree row
Translatable::creating_from(Session::get($id.'_originalLangID'));
}
return $originalItem;