Commit aa75768f authored by Fabio Stegmeyer's avatar Fabio Stegmeyer

[BUGFIX] reintroduce cruser_id field (required for logging)

[BUGFIX] Fix record_uid determination in TCEmainHook
parent 6263515e
......@@ -268,10 +268,12 @@ class TceMainHook {
$recordUid = -1;
if (isset($incomingFieldArray['record_uid'])) {
if ($languageId == 0) {
$recordUid = (int) $incomingFieldArray['record_uid'];
if ($languageId === 0) {
$recordUid = (int) str_replace($recordTable . '_', '', $incomingFieldArray['record_uid']);
} else {
$recordUid = (int) $incomingFieldArray['default_language_record_uid'];
$recordUid = (int) str_replace(
$recordTable . '_', '', $incomingFieldArray['default_language_record_uid']
);
}
}
......@@ -396,10 +398,10 @@ class TceMainHook {
'flag' => $visibilityFlag,
'pid' => $childPageUid,
'record_table' => 'pages',
'record_uid' => $childPageUid,
'record_uid' => 'pages_' . $childPageUid,
'record_language_uid' => $languageId,
'default_language_record_uid' => $defaultLanguageRecordUid,
'cruser_id ' => $GLOBALS['BE_USER']->user['uid'],
'cruser_id' => $GLOBALS['BE_USER']->user['uid'],
]
);
} else {
......
......@@ -33,6 +33,7 @@ CREATE TABLE tx_languagevisibility_visibility_flag (
pid int(11) DEFAULT '0' NOT NULL,
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
record_table text NOT NULL,
record_uid text DEFAULT '' NOT NULL,
record_language_uid int(11) DEFAULT '0' NOT NULL,
......
Markdown is supported
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