Project

General

Profile

Feature #16786 » sys_lockedrecords+feuserid.patch

Administrator Admin, 2006-12-14 15:27

View differences:

t3lib/class.t3lib_befunc.php (working copy)
'record_table' => $table,
'record_uid' => $uid,
'username' => $GLOBALS['BE_USER']->user['username'],
'record_pid' => $pid
'record_pid' => $pid,
'feuserid' => 0
);
$GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_lockedrecords', $fields_values);
......
while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$LOCKED_RECORDS[$row['record_table'].':'.$row['record_uid']]=$row;
$LOCKED_RECORDS[$row['record_table'].':'.$row['record_uid']]['msg']=sprintf(
$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.lockedRecord'),
($row['userid'] ?
$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.lockedRecord'):
$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.lockedRecordByFE')),
$row['username'],
t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME']-$row['tstamp'],$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears'))
);
if ($row['record_pid'] && !isset($LOCKED_RECORDS[$row['record_table'].':'.$row['record_pid']])) {
$LOCKED_RECORDS['pages:'.$row['record_pid']]['msg']=sprintf(
$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.lockedRecord_content'),
($row['userid'] ?
$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.lockedRecord_content') :
$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.lockedRecordByFE_content')),
$row['username'],
t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME']-$row['tstamp'],$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears'))
);
t3lib/stddb/tables.sql (working copy)
record_uid int(11) DEFAULT '0' NOT NULL,
record_pid int(11) DEFAULT '0' NOT NULL,
username varchar(20) DEFAULT '' NOT NULL,
feuserid int(11) unsigned DEFAULT '0' NOT NULL,
PRIMARY KEY (uid),
KEY event (userid,tstamp)
);
typo3/sysext/lang/locallang_core.xml (working copy)
<label index="labels.makeShortcut">Create a shortcut to this page?</label>
<label index="labels.lockedRecord">The user '%s' began to edit this record %s ago.</label>
<label index="labels.lockedRecord_content">The user '%s' began to edit content on this page %s ago.</label>
<label index="labels.lockedRecordByFE">The FE-user '%s' began to edit this record %s ago.</label>
<label index="labels.lockedRecordByFE_content">The FE-user '%s' began to edit content on this page %s ago.</label>
<label index="labels.showRecords">Show records</label>
<label index="labels.path">Path</label>
<label index="labels.table">Table</label>
(1-1/7)