mirror of
https://github.com/silverstripe/silverstripe-translatable
synced 2024-10-22 09:05:59 +00:00
Avoid flagging pages as "modified"
I moved the internals of `writeToStage` in here, in order to be able to use `writeWithoutVersion`.
This commit is contained in:
parent
13eba8d020
commit
39b1bc6492
@ -710,7 +710,12 @@ class Translatable extends DataExtension implements PermissionProvider {
|
|||||||
if(!$obj) continue;
|
if(!$obj) continue;
|
||||||
|
|
||||||
$obj->Locale = Translatable::default_locale();
|
$obj->Locale = Translatable::default_locale();
|
||||||
$obj->writeToStage($stage);
|
|
||||||
|
$oldMode = Versioned::get_reading_mode();
|
||||||
|
Versioned::reading_stage($stage);
|
||||||
|
$obj->writeWithoutVersion();
|
||||||
|
Versioned::set_reading_mode($oldMode);
|
||||||
|
|
||||||
$obj->addTranslationGroup($obj->ID);
|
$obj->addTranslationGroup($obj->ID);
|
||||||
$obj->destroy();
|
$obj->destroy();
|
||||||
unset($obj);
|
unset($obj);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user