Skip to content

Commit

Permalink
Merge tag '3.0.8' into develop
Browse files Browse the repository at this point in the history
no message
  • Loading branch information
qzminski committed Sep 10, 2019
2 parents 76062ae + 944371f commit b25e8ca
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 @@ -1253,9 +1253,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 b25e8ca

Please sign in to comment.