[TYPO3-dev] Where clipboard data is saved?

Tapio Markula tapio.markula at atwebteam.com
Thu Feb 8 14:06:17 CET 2007


Olivier Dobberkau kirjoitti:
> in Beitrag mailman.1.1170936115.10914.typo3-dev at lists.netfielders.de schrieb
> Tapio Markula unter tapio.markula at atwebteam.com am 08.02.2007 13:00 Uhr:
> 
>> Hi
>>
>> Where clipboard data is saved?
>> If not cleared it is available in next session.
>> Then saved somewhere, but where?
> 
> Hello Tapio.
> 
> As always in Userconfigfield of the  Backenduser.
> 
> Olivier 

$BE_USER->uc?

Then clearing can be done using SQL-query.
But how to change that field because
it has freely defined data, which is presumably packed.
How to unpack, change and repack.
That might be complex process.
Could you please be more exact and give some example code?

Endeed I don't know yet sure,
where the clipboard data is stored but I debugged
$_POST and $_GET parameters.

Clearing clipboard has been done with a $_GET param,
for example

['CB']['remove']['tt_content|388']

So clearing is possible to make a fake $_GET to the top of the page

$myGET=t3lib_div::_GET();

...

if(is_array($myGET['CB']['el'])) { // if clipboard data exist
    if(!$myGET['sourcePointer']['setCopyMode'] && 
isset($myPOST['TSFE_EDIT'])) // if certain conditions are fulfilled - in 
practise all commands except 'copy'
        $_GET['CB']['remove']=key($myGET['CB']['el']);   // set $_GET 
parameter to clear clipboard
    }

Maybe that is an ugly hack, but it works.
Should not be against security issues, because I don't *fetch*
$_GET params as such but just set it directly.
$_GET is always fetched using the core function
t3lib_div::_GET() or t3lib_div::_GP() (the latter, if the parmeter is 
send sometime using $_GET and sometimes using $_POST).

Note that that must be executed *before* the page is generated.
If some core function can be used for that purpose outside class,
maybe resetting $_GET could be done with some "nicer" way.





More information about the TYPO3-dev mailing list