100) break; // Security that it's not an eternal loop. } } $date = date('Y-m-d', $son); $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'title LIKE '.$GLOBALS['TYPO3_DB']->fullQuoteStr($name.$date, 'pages')); // get the uid of the page $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res); $value=$row['uid']; if ($value=='') { $value=$GLOBALS['TSFE']->page['uid']; } $items=t3lib_div::intExplode(',',$value); while(list(,$id)=each($items)) { $res = $GLOBALS['TSFE']->cObj->exec_getQuery('pages',Array('pidInList'=>$id,'orderBy'=>$altSortField)); while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { $menuItemsArray[]=$row; } } ?>