[TYPO3-dev] kb_nescefe

Tapio Markula tapio.markula at xetpoint.fi
Tue Jul 10 09:16:09 CEST 2007


Tapio Markula kirjoitti:
> 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;
>       }



Does this have sense?

if($GLOBALS['TSFE']->beUserLogin) {

$workspaceOL = get_class_methods('t3lib_BEfunc');
$workspaceOL = in_array('workspaceol', $workspaceOL);
if($workspaceOL)
    t3lib_BEfunc::workspaceOL('tt_content', $row);   }

At least content was rendered.




More information about the TYPO3-dev mailing list