[TYPO3-core] RFC: Feature #7572: Extend $TSFE for FeUsers in table sys_lockedrecords

Oliver Hader oliver at typo3.org
Tue Oct 28 18:46:06 CET 2008


Hi Stefan,

Stefan Geith schrieb:
> Sorry, wrong patch appended...
> 
> Stefan Geith schrieb:
>> This is an SVN patch request.
>>
>> Type: New feature
>>
>> Bugtracker references:
>>    http://bugs.typo3.org/view.php?id=7572
>>    (http://bugs.typo3.org/view.php?id=7571)
>>    and
>>    old: http://bugs.typo3.org/view.php?id=4655
>>
>> Branches:
>>    4.2, Trunk
>>
>> Problem:
>>    Manage locked records also for Fe-User Editing - TSFE-Part
>>
>> Solution:
>>    Add 3 functions to TSFE for
>>    - locking a record
>>    - unlocking a record
>>    - checking if record is already locked
>>
>> Notes:
>>    This Request (together with 7571) replaces BT 4655.
>>    I already use this in 4.1 with my extensions based on
>>    library sg_zfelib.
>>    This patch requires the patch from BT-Entry 7571
>>    (http://bugs.typo3.org/view.php?id=7571) to be applied.
>>
>>    A Test-Extension can be found in the BT.

Some annotations to your patch:
* please define the function access "public function ..."
* call "lockRecords" further "setRecordEditLock"
* call "unlockRecords" further "removeRecordEditLocks"
* integrate boolean return values for the set/remove methods that state
whether the actions was successful
* please use TYPO3_DB->fullQuoteStr() to escape strings for database
disposal
* instead of checking an FE-user array that might not exist, you can
pre-check this by using $TSFE->loginUser
* a method name beginning with "is" should return a boolean value in
general - if information should be returned this can be done by calling
a method with an array as reference that will be filled if available,
e.g methodName($table, $uid, &$information = NULL)
* inside isRecordLocked() you select all items of sys_lockedrecords and
recude it later to the requested table name and its uid - this can be
improved - I know that it's the same in t3lib_BEfunc, but that's no
reason for copy&paste

I hope that you're still motivated to enhance your patch after my
pedantic review. Thanks so far for the almost finished new feature!

One last thing: Please rock on! ;)

olly
-- 
Oliver Hader
TYPO3 4.3 Release Manager


More information about the TYPO3-team-core mailing list