[TYPO3-core] RFC: #8830: Missing "Save&Close" in template module Info/Modify

Dmitry Dulepov [typo3] dmitry at typo3.org
Wed Jul 2 07:54:34 CEST 2008


Hi!

Steffen Kamper wrote:
> Dmitry Dulepov [typo3] schrieb:
>> Put negative uid of the record as 'pid' in a call to 
>> t3lib_main->process_cmdmap().
> 
> i don't mean uid, i'm talking of sorting. Created record has to be the 
> "highest" sorting to be the last one. The method which is in core with 
> setting

This is what negative uids do in a call to TCEmain.

> 'sorting' => time()
> tries to do, but doesn't affect, you also could write
> 'sorting' => 'do_please_do_me_the_last'
> 
> putting negative uid would mean that the sorting function handles it as 
> workspace record.

No, it is not :) When you pass negative pid value to TCEmain, TCEmain knows to interpret it as special sorting request. It is always this way and it is never interpreted as something to do with workspace. TCEmain creates negitive pids for workspaces internally only. You can't make TCEmain believe that you are doing workspace-related tasks by passing negative pid. If you pass negative pid, it will never go to database and will never cause any workspace operation.

> there is no break in logic. Have a look at olly's modification, it 
> absolutely makes sense.
> 
> 
> anyway, here is the patch "with" taking olly's modification into 
> account, and it works perfect.

May be it works but it does *not* make sense because such functionality already exist. I am sorry to say it (accept my appology in advance) but the patch comes from the lack of TCEmain code knowledge :( Here is phpDoc from getSortingNumber for your convenience: "Positioning PID, ... <0 (pointing to record in which case to find next sorting number after this record)" So you need to set pid to negative uid of the current last record on the page. That's all. It is official way to insert new record as the very last record on the page. No need to add magical property. You already can do your task without it.

You wrote two mails ago: "it's atm not possible to create the new record after existing". I say it is possible.

-- 
Dmitry Dulepov
http://typo3bloke.net/


More information about the TYPO3-team-core mailing list