Issue Feature Closed

#16308wraps missing in select (begin, max, selectFields)

Bastiaan Zapf 06/30/06, 10:00 updated 12/04/14, 16:49

Description

wraps are just about everywhere, except in select, where they might actually be useful. A typical example would be LIMIT’ing a pages query according to a GPVar.

I fell short of registering that as a major bug.

Applying this patch to

typo3/sysext/cms/tslib/class.tslib_content.php

6547c6547
< $queryParts[‘SELECT’] = $conf[‘selectFields’] ? $this->stdWrap($conf[‘selectFields’],$conf[‘selectFields.’]) : ‘‘;
—-
> $queryParts[‘SELECT’] = $conf[‘selectFields’] ? $conf[‘selectFields’] : ‘
’;
6567c6567
< if ($conf[‘begin’] && !$conf[‘max’] && !$conf[‘max.’]) {
—-
> if ($conf[‘begin’] && !$conf[‘max’]) {
6571,6572c6571,6572
< if (($conf[‘begin’]||$conf[‘begin.’]) && $conf[‘max’]) {
< $queryParts[‘LIMIT’] = $this->stdWrap($conf[‘begin’],$conf[‘begin.’]).’,’.$this->stdWrap($conf[‘max’],$conf[‘max.’]);
—-
> if ($conf[‘begin’] && $conf[‘max’]) {
> $queryParts[‘LIMIT’] = $this->stdWrap($conf[‘begin’]).’,’.$this->stdWrap($conf[‘max’]);
6574c6574
< $queryParts[‘LIMIT’] = $this->stdWrap($conf[‘max’],$conf[‘max.’]);
—-
> $queryParts[‘LIMIT’] = $this->stdWrap($conf[‘max’]);
6577d6576
<

will give users the possibility to wrap selectFields, begin and max.
(issue imported from #M3776)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.