[TYPO3-dev] kb_nescefe

Tapio Markula tapio.markula at xetpoint.fi
Sun Jul 8 18:44:30 CEST 2007


Hi

B. Kraft published once kb_nescefe, which is not anymore available. I 
had some bugs and I have tried to fix them. I might deliver it among
tm_contentaccess.

the pi1-class has bug in getContentElements

function getContentElements()   {
		$showLanguage = ($GLOBALS['TSFE']->sys_language_content==0) ? ' AND 
sys_language_uid IN (0,-1)' : ' AND 
sys_language_uid='.$GLOBALS['TSFE']->sys_language_content;
                 $rows = 
$GLOBALS['TSFE']->sys_page->getRecordsByField('tt_content', 'pid', 
$GLOBALS['TSFE']->id, ' AND colPos LIKE 
\''.$this->cObj->data['uid'].'__%\'', '', 'sorting');
		$storage = array();
                 if (is_array($rows))    {
                         foreach ($rows as $row) {
// I added test if be-functions can be used
				if($GLOBALS['TSFE']->beUserLogin) {
#$versionOL = get_class_methods('t3lib_BEfunc');
					#$versionOL = in_array('versionol', $versionOL); // doesn't exist, 
exists workspaceol, this must be a bug
					#if($versionOL) // nonsense because of a bug
					#	$row = $GLOBALS['TSFE']->sys_page->versionOL('tt_content', $row);
					}
                                 $storage[$row['colPos']][] = $row;
                         }
                 }
// had bug - missing return statement
		return  $storage;
	  }

Well could somebody quess, what might be the correct code?
t3lib_div::debug($GLOBALS['TSFE']->sys_page);
gives:

[versioningPreview] =>
[versioningWorkspaceId] => 0
Testing what - workspaces
					if($workspaceOL)
						$row = $GLOBALS['TSFE']->sys_page->workspaceOL('tt_content', 
$row); // doesn't exist

that can't be correct.

I didn't get contact to the author, why I ask in this list.




More information about the TYPO3-dev mailing list