From 39b1bc64925b4a5f388de76b399065950e9ae154 Mon Sep 17 00:00:00 2001 From: JorisDebonnet Date: Tue, 11 Nov 2014 16:15:09 +0100 Subject: [PATCH] Avoid flagging pages as "modified" I moved the internals of `writeToStage` in here, in order to be able to use `writeWithoutVersion`. --- code/model/Translatable.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/model/Translatable.php b/code/model/Translatable.php index 0df9087..a5f5194 100755 --- a/code/model/Translatable.php +++ b/code/model/Translatable.php @@ -710,7 +710,12 @@ class Translatable extends DataExtension implements PermissionProvider { if(!$obj) 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);