Merge pull request #171 from JorisDebonnet/patch-1

Avoid flagging pages as "modified"
This commit is contained in:
Ingo Schommer 2014-11-12 21:22:57 +13:00
commit 7633c07524

View File

@ -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);