Skip to content

Commit

Permalink
Merge branch 'hotfix/4.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
qzminski committed May 7, 2020
2 parents f43270e + df8fe5b commit 57adb60
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,15 @@ public function copy($blnDoNotRedirect = false)
$set = $this->set;

foreach ($objTranslations->row() as $k => $v) {
if (in_array($k, array_keys($GLOBALS['TL_DCA'][$this->strTable]['fields']))
&& $GLOBALS['TL_DCA'][$this->strTable]['fields'][$k]['eval']['translatableFor'] != ''
) {
if (array_key_exists($k, $GLOBALS['TL_DCA'][$this->strTable]['fields'])) {
if (!$GLOBALS['TL_DCA'][$this->strTable]['fields'][$k]['eval']['translatableFor']) {
if (isset($GLOBALS['TL_DCA'][$this->strTable]['fields'][$k]['default'])) {
$set[$k] = $GLOBALS['TL_DCA'][$this->strTable]['fields'][$k]['default'];
} else {
unset($set[$k]);
}
continue;
}
// Empty unique fields or add a unique identifier in copyAll mode
if ($GLOBALS['TL_DCA'][$this->strTable]['fields'][$k]['eval']['unique']) {
if (\Input::get('act') == 'copyAll') {
Expand Down

0 comments on commit 57adb60

Please sign in to comment.