[TYPO3-core] RFC: DBAL Core Changes

Bernhard Kraft kraftb at kraftb.at
Tue Dec 27 00:55:57 CET 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Karsten Dambekalns wrote:
> Please check this code thoroughly, as it affects core parts of TYPO3. But 
> please do it before 26th, so it will make it into the beta release. Thanks!
> 
> Included in this patch is the fixed fix for bug #1649 that I sent to this list 
> earlier.

I reviewed the code but have to say that I have quite to few knowledge of t3lib_sqlparser.php
There are some new regex'es - I didn't find any obvious error in them but as already sayd can't
confirm that they do what they should do.

The first part for handling MM relations with the same local and foreign table is really good
and required. without it (like now) the result will be simply false.

I have some questions to the last parts in the patch. See commented patch below:

> Merry Christmas,

Also a merry christmas.

> -					($local_table ? $local_table.',' : '').$mm_table.($foreign_table ? ','.$foreign_table : ''),
> +					($local_table ? $local_table.',' : '').$mm_table.($foreign_table ? ','. $foreign_table.($foreign_table_as ? ' AS '.$foreign_table_as : '') : ''),

This is +1 !


> --- t3lib/stddb/tbl_be.php	23 Nov 2005 23:51:39 -0000	1.26
> +++ t3lib/stddb/tbl_be.php	23 Dec 2005 20:19:43 -0000
> @@ -622,7 +622,7 @@
>  			'config' => Array (
>  				'type' => 'select',
>  				'foreign_table' => 'be_groups',
> -				'foreign_table_where' => 'AND be_groups.uid != ###THIS_UID### AND NOT be_groups.hidden ORDER BY be_groups.title',
> +				'foreign_table_where' => 'AND NOT(be_groups.uid = ###THIS_UID###) AND be_groups.hidden=0 ORDER BY be_groups.title',

Why did you change

a != b

to

NOT (a = b)

can the "old" form not get parsed anymore ? If the old form isn't supported any more doesn't this break
compatibility with extensions and parts of the core where a!=b is used which you have not found (didn't
know if and how you searched for occurences of !=)

But if compatibility is kept (and this has other reasons) i say +1



greets,
Bernhard
- --
- ----------------------------------------------------------------------
"Freiheit ist immer auch die Freiheit des Andersdenkenden"
Rosa Luxemburg, 1871 - 1919
- ----------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDsIMNIl4dkVkDMFkRAuZxAJ4mdOao9Oo9MuQtGjcoZJfbSLwomACcDmGb
s2pM4NNVMzNl1oBxemDxvPQ=
=zjMp
-----END PGP SIGNATURE-----



More information about the TYPO3-team-core mailing list