Skip to content

Commit

Permalink
Avoid flagging pages as "modified"
Browse files Browse the repository at this point in the history
I moved the internals of `writeToStage` in here, in order to be able to use `writeWithoutVersion`.
  • Loading branch information
JorisDebonnet authored and robbieaverill committed Apr 20, 2018
1 parent bb4d553 commit 60b8ba9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion code/model/Translatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,12 @@ public function requireDefaultRecords() {
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);
Expand Down

0 comments on commit 60b8ba9

Please sign in to comment.