"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core-bundle/src/Resources/contao/drivers/DC_Folder.php" between
contao-4.8.1.tar.gz and contao-4.8.2.tar.gz

About: Contao (fka TYPOlight) is a content management system (CMS). Latest release.

DC_Folder.php  (contao-4.8.1):DC_Folder.php  (contao-4.8.2)
skipping to change at line 1527 skipping to change at line 1527
$this->import($callback[0]); $this->import($callback[0]);
$this->{$callback[0]}->{$callback [1]}($this); $this->{$callback[0]}->{$callback [1]}($this);
} }
elseif (\is_callable($callback)) elseif (\is_callable($callback))
{ {
$callback($this); $callback($this);
} }
} }
} }
// Set the current timestamp before creating a new versio
n
if ($this->blnIsDbAssisted && $objModel !== null)
{
$this->Database->prepare("UPDATE " . $this->strTa
ble . " SET tstamp=? WHERE id=?")
->execute(time(), $obj
Model->id);
}
// Save the current version // Save the current version
if ($this->blnCreateNewVersion && $objModel !== null) if ($this->blnCreateNewVersion && $objModel !== null)
{ {
$objVersions->create(); $objVersions->create();
// Call the onversion_callback // Call the onversion_callback
if (\is_array($GLOBALS['TL_DCA'][$this->strTable] ['config']['onversion_callback'])) if (\is_array($GLOBALS['TL_DCA'][$this->strTable] ['config']['onversion_callback']))
{ {
@trigger_error('Using the "onversion_call back" has been deprecated and will no longer work in Contao 5.0. Use the "oncrea te_version_callback" instead.', E_USER_DEPRECATED); @trigger_error('Using the "onversion_call back" has been deprecated and will no longer work in Contao 5.0. Use the "oncrea te_version_callback" instead.', E_USER_DEPRECATED);
skipping to change at line 1552 skipping to change at line 1559
$this->{$callback[0]}->{$ callback[1]}($this->strTable, $objModel->id, $this); $this->{$callback[0]}->{$ callback[1]}($this->strTable, $objModel->id, $this);
} }
elseif (\is_callable($callback)) elseif (\is_callable($callback))
{ {
$callback($this->strTable , $objModel->id, $this); $callback($this->strTable , $objModel->id, $this);
} }
} }
} }
} }
// Set the current timestamp (-> DO NOT CHANGE THE ORDER
version - timestamp)
if ($this->blnIsDbAssisted && $objModel !== null)
{
$this->Database->prepare("UPDATE " . $this->strTa
ble . " SET tstamp=? WHERE id=?")
->execute(time(), $obj
Model->id);
}
// Redirect // Redirect
if (isset($_POST['saveNclose'])) if (isset($_POST['saveNclose']))
{ {
Message::reset(); Message::reset();
$this->redirect($this->getReferer()); $this->redirect($this->getReferer());
} }
// Reload // Reload
if ($this->blnIsDbAssisted && $this->objActiveRecord !== null) if ($this->blnIsDbAssisted && $this->objActiveRecord !== null)
{ {
skipping to change at line 1756 skipping to change at line 1756
$this->import($ca llback[0]); $this->import($ca llback[0]);
$this->{$callback [0]}->{$callback[1]}($this); $this->{$callback [0]}->{$callback[1]}($this);
} }
elseif (\is_callable($cal lback)) elseif (\is_callable($cal lback))
{ {
$callback($this); $callback($this);
} }
} }
} }
// Set the current timestamp before addin
g a new version
if ($this->blnIsDbAssisted && $objModel !
== null)
{
$this->Database->prepare("UPDATE
" . $this->strTable . " SET tstamp=? WHERE id=?")
->exec
ute(time(), $objModel->id);
}
// Create a new version // Create a new version
if ($this->blnCreateNewVersion && $objMod el !== null) if ($this->blnCreateNewVersion && $objMod el !== null)
{ {
$objVersions->create(); $objVersions->create();
// Call the onversion_callback // Call the onversion_callback
if (\is_array($GLOBALS['TL_DCA'][ $this->strTable]['config']['onversion_callback'])) if (\is_array($GLOBALS['TL_DCA'][ $this->strTable]['config']['onversion_callback']))
{ {
@trigger_error('Using the "onversion_callback" has been deprecated and will no longer work in Contao 5.0. Use the "oncreate_version_callback" instead.', E_USER_DEPRECATED); @trigger_error('Using the "onversion_callback" has been deprecated and will no longer work in Contao 5.0. Use the "oncreate_version_callback" instead.', E_USER_DEPRECATED);
skipping to change at line 1780 skipping to change at line 1787
$this->im port($callback[0]); $this->im port($callback[0]);
$this->{$ callback[0]}->{$callback[1]}($this->strTable, $objModel->id, $this); $this->{$ callback[0]}->{$callback[1]}($this->strTable, $objModel->id, $this);
} }
elseif (\is_calla ble($callback)) elseif (\is_calla ble($callback))
{ {
$callback ($this->strTable, $objModel->id, $this); $callback ($this->strTable, $objModel->id, $this);
} }
} }
} }
} }
// Set the current timestamp (-> DO NOT C
HANGE ORDER version - timestamp)
if ($this->blnIsDbAssisted && $objModel !
== null)
{
$this->Database->prepare("UPDATE
" . $this->strTable . " SET tstamp=? WHERE id=?")
->exec
ute(time(), $objModel->id);
}
} }
} }
// Submit buttons // Submit buttons
$arrButtons = array(); $arrButtons = array();
$arrButtons['save'] = '<button type="submit" name="save" id="save" class="tl_submit" accesskey="s">'.$GLOBALS['TL_LANG']['MSC']['save'].' </button>'; $arrButtons['save'] = '<button type="submit" name="save" id="save" class="tl_submit" accesskey="s">'.$GLOBALS['TL_LANG']['MSC']['save'].' </button>';
$arrButtons['saveNclose'] = '<button type="submit" name=" saveNclose" id="saveNclose" class="tl_submit" accesskey="c">'.$GLOBALS['TL_LANG' ]['MSC']['saveNclose'].'</button>'; $arrButtons['saveNclose'] = '<button type="submit" name=" saveNclose" id="saveNclose" class="tl_submit" accesskey="c">'.$GLOBALS['TL_LANG' ]['MSC']['saveNclose'].'</button>';
// Call the buttons_callback (see #4691) // Call the buttons_callback (see #4691)
if (\is_array($GLOBALS['TL_DCA'][$this->strTable]['edit'] ['buttons_callback'])) if (\is_array($GLOBALS['TL_DCA'][$this->strTable]['edit'] ['buttons_callback']))
 End of changes. 4 change blocks. 
21 lines changed or deleted 21 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)