Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FIXED: Simplified code

  • Loading branch information...
commit 67915ea6957940505d9eeccdf7198f38d285ba40 1 parent 9159619
@tractorcow tractorcow authored chillu committed
Showing with 1 addition and 11 deletions.
  1. +1 −11 code/model/Translatable.php
View
12 code/model/Translatable.php
@@ -1174,17 +1174,7 @@ protected function populateSiteConfig() {
// This is similar to the creation of objects via createTranslation,
// although by default this object should not be saved
$this->owner->update($stagingConfig->toMap());
-
- // Copy translation group
- // @todo Candidate for a refactor, along with other parts of this code
- // that reference _TranslationGroupID / getTranslationGroup
- if($group = $stagingConfig->getTranslationGroup()) {
- $this->owner->_TranslationGroupID = $group;
- } elseif(!empty($stagingConfig->_TranslationGroupID)) {
- $this->owner->_TranslationGroupID = $stagingConfig->_TranslationGroupID;
- } else {
- $this->owner->_TranslationGroupID = $stagingConfig->ID;
- }
+ $this->owner->_TranslationGroupID = $existingConfig->getTranslationGroup();
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.