*** empty log message ***
authorKasper Skårhøj <kasper@typo3.org>
Thu, 1 Apr 2004 16:38:53 +0000 (16:38 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Thu, 1 Apr 2004 16:38:53 +0000 (16:38 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@187 709f56b5-9817-0410-a4d7-c38de5d9e867

t3lib/class.t3lib_page.php
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_fe.php

index edd60e6..9968000 100755 (executable)
  *
  *
  *
- *  101: class t3lib_pageSelect 
- *  117:     function init($show_hidden)       
+ *  101: class t3lib_pageSelect
+ *  117:     function init($show_hidden)
  *
  *              SECTION: Selecting page records
- *  156:     function getPage($uid)    
- *  171:     function getPage_noCheck($uid)    
- *  186:     function getFirstWebPage($uid)    
- *  203:     function getPageIdFromAlias($alias)       
- *  219:     function getPageOverlay($pageInput,$lUid=-1)      
+ *  156:     function getPage($uid)
+ *  171:     function getPage_noCheck($uid)
+ *  186:     function getFirstWebPage($uid)
+ *  203:     function getPageIdFromAlias($alias)
+ *  219:     function getPageOverlay($pageInput,$lUid=-1)
  *
  *              SECTION: Page related: Menu, Domain record, Root line
- *  296:     function getMenu($uid,$fields='*',$sortField='sorting',$addWhere='')      
+ *  296:     function getMenu($uid,$fields='*',$sortField='sorting',$addWhere='')
  *  315:     function getDomainStartPage($domain, $path='',$request_uri='')
- *  361:     function getRootLine($uid, $MP='')        
- *  421:     function getPathFromRootline($rl,$len=20) 
- *  442:     function getExtURL($pagerow,$disable=0)
+ *  362:     function getRootLine($uid, $MP='')
+ *  422:     function getPathFromRootline($rl,$len=20)
+ *  443:     function getExtURL($pagerow,$disable=0)
  *
  *              SECTION: Selecting records in general
- *  483:     function checkRecord($table,$uid,$checkPage=0)    
- *  513:     function getRawRecord($table,$uid,$fields='*')    
- *  536:     function getRecordsByField($theTable,$theField,$theValue,$whereClause='',$groupBy='',$orderBy='',$limit='')       
+ *  491:     function checkRecord($table,$uid,$checkPage=0)
+ *  521:     function getRawRecord($table,$uid,$fields='*')
+ *  544:     function getRecordsByField($theTable,$theField,$theValue,$whereClause='',$groupBy='',$orderBy='',$limit='')
  *
  *              SECTION: Caching and standard clauses
- *  587:     function getHash($hash,$expTime=0)        
- *  610:     function storeHash($hash,$data,$ident)    
- *  628:     function deleteClause($table)     
- *  643:     function enableFields($table,$show_hidden=-1,$ignore_array=array())       
+ *  595:     function getHash($hash,$expTime=0)
+ *  618:     function storeHash($hash,$data,$ident)
+ *  636:     function deleteClause($table)
+ *  651:     function enableFields($table,$show_hidden=-1,$ignore_array=array())
  *
  * TOTAL FUNCTIONS: 18
  * (This index is automatically created/updated by the extension "extdeveval")
index 168ec43..2f94329 100755 (executable)
@@ -328,6 +328,7 @@ class tslib_cObj {
        var $lastTypoLinkUrl='';        // This will be set by typoLink() to the url of the most recent link created.
        var $lastTypoLinkTarget='';     // DO. link target.
        var $substMarkerCache=array();  // Caching substituteMarkerArrayCached function
+       var $recordRegister=array();    // Array that registers rendered content elements (or any table) to make sure they are not rendered recursively!
        
        /**
         * Class constructor.
@@ -1096,9 +1097,9 @@ class tslib_cObj {
        function CONTENT($conf) {
                $theValue='';
 
-               $originalRec=$GLOBALS['TSFE']->currentRecord;   
+               $originalRec = $GLOBALS['TSFE']->currentRecord;
                if ($originalRec)       {               // If the currentRecord is set, we register, that this record has invoked this function. It's should not be allowed to do this again then!!
-                       $GLOBALS['TSFE']->recordRegister[md5($originalRec)]++;
+                       $GLOBALS['TSFE']->recordRegister[$originalRec]++;
                }
 
                if ($conf['table']=='pages' || substr($conf['table'],0,3)=='tt_' || substr($conf['table'],0,3)=='fe_' || substr($conf['table'],0,3)=='tx_' || substr($conf['table'],0,4)=='ttx_' || substr($conf['table'],0,5)=='user_')        {
@@ -1117,23 +1118,24 @@ class tslib_cObj {
                                $cObj->setParent($this->data,$this->currentRecord);
                                $this->currentRecordNumber=0;
                                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))      {
-                                       if (!$GLOBALS['TSFE']->recordRegister[md5($val['table'].':'.$val['id'])])       {
+                                       if (!$GLOBALS['TSFE']->recordRegister[$conf['table'].':'.$row['uid']])  {
                                                $this->currentRecordNumber++;
-                                               $cObj->parentRecordNumber=$this->currentRecordNumber;
-                                               $GLOBALS['TSFE']->currentRecord=$conf['table'].':'.$row['uid'];
+                                               $cObj->parentRecordNumber = $this->currentRecordNumber;
+                                               $GLOBALS['TSFE']->currentRecord = $conf['table'].':'.$row['uid'];
                                                $this->lastChanged($row['tstamp']);
                                                $cObj->start($row,$conf['table']);
-                                               if ($GLOBALS['TSFE']->config['config']['insertDmailerBoundaries'])      {$theValue.='<!--DMAILER_SECTION_BOUNDARY_'.intval($row['module_sys_dmail_category']).'-->';}
-                                               $theValue.=$cObj->cObjGetSingle($renderObjName, $renderObjConf, $renderObjKey);
-                                       } else {debug($val['table'].':'.$val['id']);}
+                                               if ($GLOBALS['TSFE']->config['config']['insertDmailerBoundaries'])      { $theValue.='<!--DMAILER_SECTION_BOUNDARY_'.intval($row['module_sys_dmail_category']).'-->'; }
+                                               $theValue.= $cObj->cObjGetSingle($renderObjName, $renderObjConf, $renderObjKey);
+                                       }# else debug($GLOBALS['TSFE']->recordRegister,'CONTENT');
                                }
-                               if ($GLOBALS['TSFE']->config['config']['insertDmailerBoundaries'])      {$theValue.='<!--DMAILER_SECTION_BOUNDARY_END-->';}
+                               if ($GLOBALS['TSFE']->config['config']['insertDmailerBoundaries'])      { $theValue.='<!--DMAILER_SECTION_BOUNDARY_END-->'; }
                        }
                }
-               
+
                $theValue = $this->wrap($theValue,$conf['wrap']);
                if ($conf['stdWrap.']) $theValue = $this->stdWrap($theValue,$conf['stdWrap.']);
-               $GLOBALS['TSFE']->currentRecord=$originalRec;
+
+               $GLOBALS['TSFE']->currentRecord = $originalRec; // Restore
                return $theValue;
        }
 
@@ -1147,9 +1149,9 @@ class tslib_cObj {
        function RECORDS($conf) {
                $theValue='';
 
-               $originalRec=$GLOBALS['TSFE']->currentRecord;   
+               $originalRec = $GLOBALS['TSFE']->currentRecord;
                if ($originalRec)       {               // If the currentRecord is set, we register, that this record has invoked this function. It's should not be allowed to do this again then!!
-                       $GLOBALS['TSFE']->recordRegister[md5($originalRec)]++;
+                       $GLOBALS['TSFE']->recordRegister[$originalRec]++;
                }
 
                $conf['source'] = $this->stdWrap($conf['source'],$conf['source.']);
@@ -1161,7 +1163,7 @@ class tslib_cObj {
                                        if (substr($k,-1)!='.')         $allowedTables.=','.$k;
                                }
                        }
-                       
+
                        $loadDB = t3lib_div::makeInstance('FE_loadDBGroup');
                        $loadDB->start($conf['source'], $allowedTables);
                        reset($loadDB->tableArray);
@@ -1185,22 +1187,22 @@ class tslib_cObj {
                                if (!$conf['dontCheckPid'])     {
                                        $row = $this->checkPid($row['pid']) ? $row : '';
                                }
-                               if ($row && !$GLOBALS['TSFE']->recordRegister[md5($val['table'].':'.$val['id'])])       {
+                               if ($row && !$GLOBALS['TSFE']->recordRegister[$val['table'].':'.$val['id']])    {
                                        $renderObjName = $conf['conf.'][$val['table']] ? $conf['conf.'][$val['table']] : '<'.$val['table'];
                                        $renderObjKey = $conf['conf.'][$val['table']] ? 'conf.'.$val['table'] : '';
                                        $renderObjConf = $conf['conf.'][$val['table'].'.'];
                                        $this->currentRecordNumber++;
                                        $cObj->parentRecordNumber=$this->currentRecordNumber;
-                                       $GLOBALS['TSFE']->currentRecord=$val['table'].':'.$val['id'];
+                                       $GLOBALS['TSFE']->currentRecord = $val['table'].':'.$val['id'];
                                        $this->lastChanged($row['tstamp']);
                                        $cObj->start($row,$val['table']);
                                        if ($GLOBALS['TSFE']->config['config']['insertDmailerBoundaries'])      {$theValue.='<!--DMAILER_SECTION_BOUNDARY_'.intval($row['module_sys_dmail_category']).'-->';}
                                        $theValue.=$cObj->cObjGetSingle($renderObjName, $renderObjConf, $renderObjKey);
                                        if ($GLOBALS['TSFE']->config['config']['insertDmailerBoundaries'])      {$theValue.='<!--DMAILER_SECTION_BOUNDARY_END-->';}
-                               }
+                               }# else debug($GLOBALS['TSFE']->recordRegister,'RECORDS');
                        }
                }
-               $GLOBALS['TSFE']->currentRecord=$originalRec;
+               $GLOBALS['TSFE']->currentRecord = $originalRec; // Restore
                return $this->wrap($theValue,$conf['wrap']);
        }
 
index eb165d0..0212a51 100755 (executable)
  *
  *
  *
- *  182: class tslib_fe        
- *  337:     function tslib_fe($TYPO3_CONF_VARS, $id, $type, $no_cache='', $cHash='', $jumpurl='',$MP='',$RDCT='')     
- *  368:     function connectToMySQL() 
- *  404:     function sendRedirect()   
+ *  182: class tslib_fe
+ *  337:     function tslib_fe($TYPO3_CONF_VARS, $id, $type, $no_cache='', $cHash='', $jumpurl='',$MP='',$RDCT='')
+ *  368:     function connectToMySQL()
+ *  404:     function sendRedirect()
  *
  *              SECTION: Initializing, resolving page id
- *  442:     function initFEuser()     
- *  496:     function checkAlternativeIdMethods()      
- *  548:     function clear_preview()  
- *  561:     function determineId()    
- *  641:     function fetch_the_id()   
- *  746:     function getPageAndRootline() 
- *  808:     function getPageShortcut($SC,$mode,$thisUid,$itera=20,$pageLog=array())   
- *  853:     function checkRootlineForIncludeSection() 
- *  886:     function checkEnableFields($row)  
- *  904:     function checkPagerecordForIncludeSection($row)   
- *  916:     function setIDfromArgV()  
- *  932:     function getPageAndRootlineWithDomain($domainStartPage)   
+ *  442:     function initFEuser()
+ *  496:     function checkAlternativeIdMethods()
+ *  548:     function clear_preview()
+ *  561:     function determineId()
+ *  641:     function fetch_the_id()
+ *  746:     function getPageAndRootline()
+ *  808:     function getPageShortcut($SC,$mode,$thisUid,$itera=20,$pageLog=array())
+ *  853:     function checkRootlineForIncludeSection()
+ *  886:     function checkEnableFields($row)
+ *  904:     function checkPagerecordForIncludeSection($row)
+ *  916:     function setIDfromArgV()
+ *  932:     function getPageAndRootlineWithDomain($domainStartPage)
  *  960:     function findDomainRecord($recursive=0)
- *  981:     function pageNotFoundHandler($code,$header='')    
- * 1003:     function checkAndSetAlias()       
- * 1018:     function idPartsAnalyze($str)     
- * 1043:     function mergingWithGetVars($GET_VARS)    
+ *  981:     function pageNotFoundHandler($code,$header='')
+ * 1003:     function checkAndSetAlias()
+ * 1018:     function idPartsAnalyze($str)
+ * 1043:     function mergingWithGetVars($GET_VARS)
  *
  *              SECTION: Template and caching related functions.
- * 1091:     function makeCacheHash()  
- * 1114:     function cHashParams($addQueryParams) 
- * 1135:     function initTemplate()   
- * 1147:     function getFromCache()   
- * 1205:     function getHash()        
- * 1224:     function getConfigArray() 
+ * 1091:     function makeCacheHash()
+ * 1114:     function cHashParams($addQueryParams)
+ * 1135:     function initTemplate()
+ * 1147:     function getFromCache()
+ * 1205:     function getHash()
+ * 1224:     function getConfigArray()
  *
  *              SECTION: Further initialization and data processing
- * 1338:     function getCompressedTCarray()   
- * 1375:     function includeTCA($TCAloaded=1) 
- * 1401:     function settingLanguage()        
- * 1441:     function checkDataSubmission()    
- * 1468:     function fe_tce() 
- * 1482:     function locDataCheck($locationData)      
- * 1498:     function sendFormmail()   
- * 1541:     function checkJumpUrl()   
- * 1623:     function jumpUrl()        
- * 1666:     function setUrlIdToken()  
+ * 1338:     function getCompressedTCarray()
+ * 1375:     function includeTCA($TCAloaded=1)
+ * 1401:     function settingLanguage()
+ * 1441:     function checkDataSubmission()
+ * 1468:     function fe_tce()
+ * 1482:     function locDataCheck($locationData)
+ * 1498:     function sendFormmail()
+ * 1541:     function checkJumpUrl()
+ * 1623:     function jumpUrl()
+ * 1666:     function setUrlIdToken()
  *
  *              SECTION: Page generation; cache handling
- * 1709:     function isGeneratePage() 
- * 1719:     function tempPageCacheContent()   
- * 1750:     function realPageCacheContent()   
- * 1772:     function setPageCacheContent($c,$d,$t)    
- * 1795:     function clearPageCacheContent()  
- * 1805:     function clearPageCacheContent_pidList($pidList)  
- * 1816:     function setSysLastChanged()      
+ * 1709:     function isGeneratePage()
+ * 1719:     function tempPageCacheContent()
+ * 1750:     function realPageCacheContent()
+ * 1772:     function setPageCacheContent($c,$d,$t)
+ * 1795:     function clearPageCacheContent()
+ * 1805:     function clearPageCacheContent_pidList($pidList)
+ * 1816:     function setSysLastChanged()
  *
  *              SECTION: Page generation; rendering and inclusion
- * 1852:     function generatePage_preProcessing()     
- * 1888:     function generatePage_whichScript()       
- * 1900:     function generatePage_postProcessing()    
- * 1988:     function INTincScript()   
- * 2049:     function INTincScript_loadJSCode()        
- * 2090:     function isINTincScript() 
- * 2099:     function isSearchIndexPage()      
- * 2108:     function doXHTML_cleaning()       
- * 2117:     function doLocalAnchorFix()       
+ * 1852:     function generatePage_preProcessing()
+ * 1888:     function generatePage_whichScript()
+ * 1900:     function generatePage_postProcessing()
+ * 1988:     function INTincScript()
+ * 2049:     function INTincScript_loadJSCode()
+ * 2090:     function isINTincScript()
+ * 2099:     function isSearchIndexPage()
+ * 2108:     function doXHTML_cleaning()
+ * 2117:     function doLocalAnchorFix()
  *
  *              SECTION: Finished off; outputting, storing session data, statistics...
- * 2148:     function isOutputting()   
- * 2159:     function processOutput()  
- * 2225:     function isEXTincScript() 
- * 2234:     function storeSessionData()       
- * 2244:     function setParseTime()   
- * 2256:     function statistics()     
- * 2350:     function previewInfo()    
- * 2371:     function beLoginLinkIPList()      
+ * 2148:     function isOutputting()
+ * 2159:     function processOutput()
+ * 2225:     function isEXTincScript()
+ * 2234:     function storeSessionData()
+ * 2244:     function setParseTime()
+ * 2256:     function statistics()
+ * 2350:     function previewInfo()
+ * 2371:     function beLoginLinkIPList()
  *
  *              SECTION: Various internal API functions
- * 2426:     function makeSimulFileName($inTitle,$page,$type,$addParams='',$no_cache='')       
- * 2473:     function simulateStaticDocuments_pEnc_onlyP_proc($linkVars)       
- * 2501:     function getSimulFileName()       
- * 2514:     function encryptEmail($string,$back=0)    
- * 2533:     function codeString($string, $decode=FALSE)       
- * 2559:     function roundTripCryptString($string)    
- * 2579:     function checkFileInclude($incFile)       
- * 2594:     function newCObj()        
- * 2607:     function setAbsRefPrefix()        
- * 2623:     function printError($label,$header='Error!')      
- * 2634:     function updateMD5paramsRecord($hash)     
- * 2645:     function tidyHTML($content)               
- * 2671:     function prefixLocalAnchorsWithScript()   
+ * 2426:     function makeSimulFileName($inTitle,$page,$type,$addParams='',$no_cache='')
+ * 2473:     function simulateStaticDocuments_pEnc_onlyP_proc($linkVars)
+ * 2501:     function getSimulFileName()
+ * 2514:     function encryptEmail($string,$back=0)
+ * 2533:     function codeString($string, $decode=FALSE)
+ * 2559:     function roundTripCryptString($string)
+ * 2579:     function checkFileInclude($incFile)
+ * 2594:     function newCObj()
+ * 2607:     function setAbsRefPrefix()
+ * 2623:     function printError($label,$header='Error!')
+ * 2634:     function updateMD5paramsRecord($hash)
+ * 2645:     function tidyHTML($content)
+ * 2671:     function prefixLocalAnchorsWithScript()
  *
  *              SECTION: Various external API functions - for use in plugins etc.
- * 2715:     function getStorageSiterootPids() 
- * 2730:     function getPagesTSconfig()       
- * 2763:     function setJS($key,$content='')  
- * 2801:     function setCSS($key,$content)    
- * 2816:     function make_seed() 
- * 2829:     function uniqueHash($str='')      
- * 2838:     function set_no_cache()   
- * 2848:     function set_cache_timeout_default($seconds)      
- * 2864:     function plainMailEncoded($email,$subject,$message,$headers='')   
- * 2887:     function sL($input)       
- * 2924:     function csConv($str,$from='')    
- * 2943:     function readLLfile($fileRef)     
- * 2958:     function getLLL($index,$LOCAL_LANG)       
- * 2972:     function initLLvars()     
+ * 2715:     function getStorageSiterootPids()
+ * 2730:     function getPagesTSconfig()
+ * 2763:     function setJS($key,$content='')
+ * 2801:     function setCSS($key,$content)
+ * 2816:     function make_seed()
+ * 2829:     function uniqueHash($str='')
+ * 2838:     function set_no_cache()
+ * 2848:     function set_cache_timeout_default($seconds)
+ * 2864:     function plainMailEncoded($email,$subject,$message,$headers='')
+ * 2887:     function sL($input)
+ * 2924:     function csConv($str,$from='')
+ * 2943:     function readLLfile($fileRef)
+ * 2958:     function getLLL($index,$LOCAL_LANG)
+ * 2972:     function initLLvars()
  *
  * TOTAL FUNCTIONS: 87
  * (This index is automatically created/updated by the extension "extdeveval")