[TYPO3-project-4-3] Improving the language overlay performance

Francois Suter fsuter at cobweb.ch
Wed Sep 17 13:51:38 CEST 2008


Hi,

> I didn't look at your code, but you said something about "exact matches
> because of version" so I thought you did some extra processing for WS.

Ah true, yes, forgot about that.

It's just a pid check on the language overlay record to make sure that 
it's gotten from the right page. In t3lib_page::getRecordOverlay, the 
overlay is gotten with the following query:

$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
	'*',
	$table,
	'pid='.intval($row['pid']).
		' AND 
'.$TCA[$table]['ctrl']['languageField'].'='.intval($sys_language_content).
		' AND 
'.$TCA[$table]['ctrl']['transOrigPointerField'].'='.intval($row['uid']).
		$this->enableFields($table),
	'',
	'',
	'1'
);

Notice the condition on the pid, where the pid of the overlay must match 
the pid of the original. I asked about that in the dev-list and Dmitry 
answered that this check was necessary because of workspaces. I worked 
on from that. Thinking back on it, I'm not sure I understand 100% why 
this is necessary, because it seems to me that checking the 
transOrigPointerField should be enough... Maybe this test could be 
dropped and simply replaced by a check on the workspace (overlay should 
be in workspace 0 as long as we don't care about preview (support for 
which could be added later and as you said needs not be optimised as much)).

Cheers

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch


More information about the TYPO3-project-4-3 mailing list