[TYPO3-core] RFC: Fix for bug #1649

Martin Kutschker Martin.Kutschker at blackbox.net
Thu Dec 22 20:30:25 CET 2005


Karsten Dambekalns <karsten at typo3.org> writes on 
Thu, 22 Dec 2005 19:29:45 +0100 (MET):

> Hi.
> 
> On Thursday 22 December 2005 17:16, Karsten Dambekalns wrote:
> 
> > > I suggested using "_join" as a suffix but simpy use uniqid() to
> > > avoid any risk of using an actual table name.
> >
> > That's a neat idea, I'll do that.
> 
> A new patch is attached.


Hm, hard to read with all those trigraphs. It's ok but I prefer something like this for readability, but it's ok by me:

$foreign_table_from = $foreign_table;
if ($foreign_table == $local_table) {
$alias = $foreign_table.uniqid('_join');
$foreign_table_as = $alias;
$foreign_table_from = $foreign_table.' AS '.;
}

Though, there is a real bug. This

($foreign_table_as ? $foreign_table_as : $foreign_table) 

should be

($foreign_table_as ? $foreign_table.' AS '.$foreign_table_as : $foreign_table) 

Masi 



More information about the TYPO3-team-core mailing list