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:
JorisDebonnet 2014-11-11 16:15:09 +01:00 committed by Robbie Averill
parent bb4d553b9c
commit 60b8ba9cdc
1 changed files with 6 additions and 1 deletions

View File

@ -743,7 +743,12 @@ class Translatable extends DataExtension implements PermissionProvider {
if(!$obj || $obj->ObsoleteClassName) continue;
$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->destroy();
unset($obj);