Project

General

Profile

Bug #19762 ยป 00010050.patch

Administrator Admin, 2009-01-03 18:22

View differences:

typo3/sysext/cms/tslib/class.tslib_content.php (Arbeitskopie)
}
if (trim($pidList)) {
$listArr = t3lib_div::intExplode(',',str_replace('this',$GLOBALS['TSFE']->contentPid,$pidList));
$listArr = $this->checkPidArray($listArr);
$listArr = $this->checkPidArray($listArr, $table);
}
$pidList = array();
if (is_array($listArr)&&count($listArr)) {
......
}
$pid_uid_flag++;
}
if (trim($conf['pidInList'])) {
if (strcmp(trim($conf['pidInList']), '')) {
$listArr = t3lib_div::intExplode(',',str_replace('this',$GLOBALS['TSFE']->contentPid,$conf['pidInList'])); // str_replace instead of ereg_replace 020800
// removes all pages which are not visible for the user!
$listArr = $this->checkPidArray($listArr);
$listArr = $this->checkPidArray($listArr, $table);
if (count($listArr)) {
$query.=' AND '.$table.'.pid IN ('.implode(',',$GLOBALS['TYPO3_DB']->cleanIntArray($listArr)).')';
$pid_uid_flag++;
......
* Removes Page UID numbers from the input array which are not available due to enableFields() or the list of bad doktype numbers ($this->checkPid_badDoktypeList)
*
* @param array Array of Page UID numbers for select and for which pages with enablefields and bad doktypes should be removed.
* @param string Name of the table the UID numbers shall be used for
* @return array Returns the array of remaining page UID numbers
* @access private
* @see getWhere(),checkPid()
*/
function checkPidArray($listArr) {
function checkPidArray($listArr, $table = '') {
$outArr = Array();
if (is_array($listArr) && count($listArr)) {
// The root page cannot be checked since there is no page with uid=0:
if ($table == 'pages' && in_array(0, $listArr, true)) {
$outArr[] = 0;
}
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'uid IN ('.implode(',',$listArr).')'.$this->enableFields('pages').' AND doktype NOT IN ('.$this->checkPid_badDoktypeList.')');
if ($error = $GLOBALS['TYPO3_DB']->sql_error()) {
$GLOBALS['TT']->setTSlogMessage($error.': '.$query,3);
    (1-1/1)