[TYPO3-team-templavoila] RFC: #2081: Using static DSes for Page and FCE
Xavier Perseguers
typo3 at perseguers.ch
Sun Jan 3 16:29:51 CET 2010
Hi,
> here is v4 with Xaviers suggestion for quoting.
> I also added a link to he xml-icon allow edit the DS-file direct.
Here is v5 based on v4 with two differences:
+ '*, CASE WHEN LOCATE(' . $GLOBALS['TYPO3_DB']->fullQuoteStr('(fce)', 'tx_templavoila_tmplobj') . ', datastructure)>0 THEN 2 ELSE 1 END scope',
+ 'tx_templavoila_tmplobj',
+ 'pid IN ('.$this->storageFolders_pidList.') AND datastructure!=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('', 'tx_templavoila_tmplobj') .
instead of
+ '*, IF(LOCATE(' . $GLOBALS['TYPO3_DB']->fullQuoteStr('(fce)', 'tx_templavoila_tmplobj') . ', datastructure)>0,2,1) scope',
+ 'tx_templavoila_tmplobj',
+ 'pid IN ('.$this->storageFolders_pidList.') AND datastructure!=""'.
Difference 1: Using CASE WHEN instead of IF as it won't need to be remapped according to the underlying DBMS (ANSI SQL) but is not (yet) supported either from DBAL
Difference 2: Properly quoting condition on datastructure column as double quotes are used to surround columns, not string in Oracle. This was a comment I made but was forgotten in v4
--
Xavier Perseguers
http://xavier.perseguers.ch/en
One contribution a day keeps the fork away
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 2081_v5.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-templavoila/attachments/20100103/85d5491e/attachment.asc>
More information about the TYPO3-team-templavoila
mailing list