[TYPO3-dev] Question about overlay query condition
Dmitry Dulepov [typo3]
dmitry at typo3.org
Sun Sep 14 20:16:31 CEST 2008
Hi!
Francois Suter wrote:
> The method t3lib_page::getRecordOverlay() is used to overlay a single
> record with its translation, if it exists.
>
> The query that fetches the overlay record looks like this:
>
> $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'
> );
>
> I'm puzzled about the condition on the pid. I don't see why it is
> necessary to test that the overlay record is on the same page as the
> original one, since we are already testing the original/translation
> relationship by comparing the transOrigPointerField to the original's uid.
>
> Am I missing something?
Yes. Workspaces.
--
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/pages/book-reviews/presentation-zen-by-garr-reynolds/
More information about the TYPO3-dev
mailing list