mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
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:
parent
9d32d9518f
commit
8425e69757
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user