Project

General

Profile

Feature #16308

Updated by Mathias Schreiber almost 10 years ago

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)

Back