Commit 4f3ced81 authored by Robert Lemke's avatar Robert Lemke
Browse files

* Created new hook in class.t3lib_tcemain.php in process_datamap. Search for $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']
(other hooks in that class will follow by Ren�, as I know from a trusted source ... ;-)


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@370 709f56b5-9817-0410-a4d7-c38de5d9e867
parent 02d1f089
2004-06-11 Robert Lemke <rl@robertlemke.de>
* Created new hook in class.t3lib_tcemain.php in process_datamap. Search for $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']
(other hooks in that class will follow by René, as I know from a trusted source ... ;-)
2004-06-09 Robert Lemke <rl@robertlemke.de>
* Fixed bug #0000123:
......
......@@ -420,7 +420,7 @@ class t3lib_TCEmain {
* @return [type] ...
*/
function process_datamap() {
global $TCA;
global $TCA, $TYPO3_CONF_VARS;
reset ($this->datamap);
// Organize tables so that the pages-table are always processed first. This is required if you want to make sure that content pointing to a new page will be created.
......@@ -553,12 +553,22 @@ class t3lib_TCEmain {
$fieldArray[$TCA[$table]['ctrl']['tstamp']]=time();
}
// Performing insert/update
if ($status=='new') {
// if ($pid_value<0) {$fieldArray = $this->fixCopyAfterDuplFields($table,$id,abs($pid_value),0,$fieldArray);} // Out-commented 02-05-02: I couldn't understand WHY this is needed for NEW records. Obviously to proces records being copied? Problem is that the fields are not set anyways and the copying function should basically take care of this!
$this->insertDB($table,$id,$fieldArray);
} else {
$this->updateDB($table,$id,$fieldArray);
// Hook: processDatamapClass
if (is_array ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'])) {
foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'] as $_classRef) {
$_procObj = &t3lib_div::getUserObj ($_classRef);
$_procObj->processDatamap_preProcessFieldArray ($status, $table, $id, &$fieldArray, &$this);
}
}
// Performing insert/update. If fieldArray has been unset by some userfunction (see hook above), don't do anything
if (is_array ($fieldArray)) {
if ($status=='new') {
// if ($pid_value<0) {$fieldArray = $this->fixCopyAfterDuplFields($table,$id,abs($pid_value),0,$fieldArray);} // Out-commented 02-05-02: I couldn't understand WHY this is needed for NEW records. Obviously to proces records being copied? Problem is that the fields are not set anyways and the copying function should basically take care of this!
$this->insertDB($table,$id,$fieldArray);
} else {
$this->updateDB($table,$id,$fieldArray);
}
}
} // if ($recordAccess) {
} // if (is_array($incomingFieldArray)) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment