Project

General

Profile

Bug #32756 » patch_32756.diff

Ronny Vorpahl, 2011-12-22 15:20

View differences:

typo3_src-4.5.9_32756/typo3/sysext/cms/tslib/class.tslib_content.php 2011-12-22 12:03:04.342714000 +0100
if ($dontCheckEnableFields || $GLOBALS['TSFE']->checkPagerecordForIncludeSection($row)) {
// Add ID to list:
if ($begin <= 0) {
if ($dontCheckEnableFields || $GLOBALS['TSFE']->checkEnableFields($row)) {
if ($dontCheckEnableFields || tslib_cObj::checkEnableFields_getTreeList($row)) {
$theList .= $next_id . ',';
}
}
......
return $theList;
}
/**
* checkEnableFields and checkPageGroupAccess TAKEN FROM class.tslib_fe.php
* Checks page record for enableFields
* Returns true if enableFields does not disable the page record.
*
* @param array The page record to evaluate (needs fields: hidden, starttime, endtime, fe_group)
* @return boolean True, if record is viewable.
* @see tslib_cObj::getTreeList(), checkPagerecordForIncludeSection()
*/
function checkEnableFields_getTreeList($row) {
if ((!$row['hidden'] || $GLOBALS['TSFE']->showHiddenPage)
&& $row['starttime']<=$GLOBALS['SIM_ACCESS_TIME']
&& ($row['endtime']==0 || $row['endtime']>$GLOBALS['SIM_ACCESS_TIME'])
) {
$groupList = $GLOBALS['TSFE']->gr_list;
if(!is_array($groupList)) {
$groupList = explode(',', $groupList);
}
$pageGroupList = explode(',', $row['fe_group'] ? $row['fe_group'] : 0);
return count(array_intersect($groupList, $pageGroupList)) > 0;
}
}
/**
* Returns a part for a WHERE clause (without preceeding operator) which will select records based on the presence of a certain string in a string-list inside the record.
* Example: If you have a record with a field, "usergroup" and that field might contain a list like "1,2,3" (with no spaces between the values) then you can select all records having eg. "2" in this list by calling this function. This is regardless of whether the number "2" is in the start, end or middle of the list - or the only value at all.
(1-1/3)