Skip to content

Commit

Permalink
Merge branch 'hotfix/3.0.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
qzminski committed Sep 10, 2019
2 parents 35fe458 + 025b567 commit 944371f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -1215,9 +1215,16 @@ protected function loadCurrentLanguageRecord()
->execute($this->intId);

$intPid = ($objCurrent->numRows) ? $objCurrent->pid : 0;
$intId = \Database::getInstance()->prepare("INSERT INTO " . $this->strTable . " ({$this->pidColumnName},tstamp,{$this->langColumnName},pid) VALUES (?,?,?,?)")
->execute($this->intId, time(), $language, $intPid)
->insertId;

if ($GLOBALS['TL_DCA'][$this->strTable]['config']['dynamicPtable']) {
$intId = \Database::getInstance()->prepare("INSERT INTO " . $this->strTable . " ({$this->pidColumnName},tstamp,{$this->langColumnName},pid,ptable) VALUES (?,?,?,?,?)")
->execute($this->intId, time(), $language, $intPid, $this->ptable)
->insertId;
} else {
$intId = \Database::getInstance()->prepare("INSERT INTO " . $this->strTable . " ({$this->pidColumnName},tstamp,{$this->langColumnName},pid) VALUES (?,?,?,?)")
->execute($this->intId, time(), $language, $intPid)
->insertId;
}
} else {
$intId = \Database::getInstance()->prepare("INSERT INTO " . $this->strTable . " ({$this->pidColumnName},tstamp,{$this->langColumnName}) VALUES (?,?,?)")
->execute($this->intId, time(), $language)
Expand Down

0 comments on commit 944371f

Please sign in to comment.